From aff763637b31d09d1ea405156bc7a20a4befe9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 14 Apr 2013 15:32:02 +0200 Subject: [PATCH] better AS1/2 parser - constantpool --- .../decompiler/flash/SWFInputStream.java | 4 +- .../jpexs/decompiler/flash/action/Action.java | 8 +- .../decompiler/flash/action/ActionGraph.java | 4 +- .../flash/action/gui/ActionPanel.java | 6 +- .../parser/script/ActionScriptLexer.java | 3196 +++++++++-------- .../parser/script/ActionScriptParser.java | 528 +-- .../flash/action/swf4/ActionJump.java | 4 +- .../flash/action/swf4/ActionPush.java | 9 +- .../flash/action/swf5/ActionConstantPool.java | 5 + .../action/swf5/ActionStoreRegister.java | 4 +- .../flash/action/swf7/ActionTry.java | 2 - .../treemodel/StoreRegisterTreeItem.java | 4 +- .../jpexs/decompiler/flash/graph/Graph.java | 2 +- 13 files changed, 1973 insertions(+), 1803 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 76b343b6a..0cca337a2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -77,8 +77,8 @@ public class SWFInputStream extends InputStream { private long percentMax; private List buffered = new ArrayList(); private ByteArrayOutputStream buffer; - private static boolean DEOBFUSCATION_ALL_CODE_IN_PREVIOUS_TAG = (Boolean)Configuration.getConfig("deobfuscateUsePrevTagOnly",true); - private static boolean AUTO_DEOBFUSCATE = (Boolean)Configuration.getConfig("autoDeobfuscate",true); + private static boolean DEOBFUSCATION_ALL_CODE_IN_PREVIOUS_TAG = (Boolean) Configuration.getConfig("deobfuscateUsePrevTagOnly", true); + private static boolean AUTO_DEOBFUSCATE = (Boolean) Configuration.getConfig("autoDeobfuscate", true); public int getBufferLength() { return buffer.size(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index c97b1ed16..304d2cf93 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -476,8 +476,8 @@ public class Action implements GraphSourceItem { if ((a instanceof ActionPush) && lastPush) { ret += " " + ((ActionPush) a).paramsToStringReplaced(list, importantOffsets, constantPool, version, hex); } else { - if(lastPush){ - ret+="\r\n"; + if (lastPush) { + ret += "\r\n"; } ret += Highlighting.hilighOffset("", offset) + a.getASMSourceReplaced(list, importantOffsets, constantPool, version, hex) + (a.ignored ? "; ignored" : "") + add + ((a instanceof ActionPush) ? "" : "\r\n"); } @@ -966,10 +966,10 @@ public class Action implements GraphSourceItem { classReg = stt.getTempRegister(); instanceReg = tmp; parts.remove(0); - parts.add(0, new StoreRegisterTreeItem(null, new RegisterNumber(classReg), stt.getValue(),false)); + parts.add(0, new StoreRegisterTreeItem(null, new RegisterNumber(classReg), stt.getValue(), false)); parts.add(1, (GraphTargetItem) stt); ((GetMemberTreeItem) str1.value).object = new DirectValueTreeItem(null, 0, new RegisterNumber(classReg), null); - parts.add(2, new StoreRegisterTreeItem(null, new RegisterNumber(instanceReg), str1.value,false)); + parts.add(2, new StoreRegisterTreeItem(null, new RegisterNumber(instanceReg), str1.value, false)); } if ((parts.size() >= 2) && (parts.get(1) instanceof SetMemberTreeItem)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 744e77abf..4c236d581 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -315,7 +315,7 @@ public class ActionGraph extends Graph { @Override protected int checkIp(int ip) { - int oldIp=ip; + int oldIp = ip; //return in for..in GraphSourceItem action = code.get(ip); if ((action instanceof ActionPush) && (((ActionPush) action).values.size() == 1) && (((ActionPush) action).values.get(0) instanceof Null)) { @@ -332,7 +332,7 @@ public class ActionGraph extends Graph { } } } - if(oldIp!=ip){ + if (oldIp != ip) { return checkIp(ip); } return ip; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java b/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java index dcb0b90ac..25b49c4d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java @@ -51,7 +51,7 @@ import jsyntaxpane.DefaultSyntaxKit; public class ActionPanel extends JPanel implements ActionListener { - private boolean debugRecompile = false; + private boolean debugRecompile = true; public LineMarkedEditorPane editor; public LineMarkedEditorPane decompiledEditor; public LineMarkedEditorPane recompiledEditor; @@ -135,7 +135,9 @@ public class ActionPanel extends JPanel implements ActionListener { decompiledEditor.setText(stripped); if (debugRecompile) { try { - recompiledEditor.setText(Highlighting.stripHilights(com.jpexs.decompiler.flash.action.Action.actionsToString(0, ActionScriptParser.parse(stripped), null, SWF.DEFAULT_VERSION, false, 0))); + ActionScriptParser ps = new ActionScriptParser(); + + recompiledEditor.setText(Highlighting.stripHilights(com.jpexs.decompiler.flash.action.Action.actionsToString(0, ps.parse(stripped), null, SWF.DEFAULT_VERSION, false, 0))); } catch (ParseException ex) { Logger.getLogger(ActionPanel.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { 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 c57eca282..95e416c4f 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 @@ -17,729 +17,732 @@ * along with this program. If not, see . */ package com.jpexs.decompiler.flash.action.parser.script; + import com.jpexs.decompiler.flash.action.parser.ParseException; import java.util.Stack; - /** - * This class is a scanner generated by - * JFlex 1.4.3 - * on 14.4.13 9:35 from the specification file + * This class is a scanner generated by + * JFlex 1.4.3 on 14.4.13 9:35 from the + * specification file * D:/Dokumenty/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/action/parser/script/actionscript.flex */ public final class ActionScriptLexer { - /** This character denotes the end of file */ - public static final int YYEOF = -1; + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + /** + * lexical states + */ + public static final int XML = 8; + public static final int XMLSTARTTAG = 6; + public static final int STRING = 2; + public static final int YYINITIAL = 0; + public static final int CHARLITERAL = 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, 3, 3, 4, 4 + }; + /** + * 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\70" + + "\1\16\1\0\1\6\1\77\1\73\1\30\1\60\1\61\1\5\1\75" + + "\1\67\1\26\1\11\1\4\1\17\3\23\4\24\2\20\1\10\1\66" + + "\1\12\1\15\1\13\1\72\1\100\4\22\1\25\1\22\21\6\1\21" + + "\2\6\1\64\1\27\1\65\1\76\1\6\1\0\1\34\1\31\1\36" + + "\1\45\1\33\1\46\1\57\1\51\1\43\1\6\1\35\1\47\1\54" + + "\1\41\1\40\1\52\1\6\1\32\1\37\1\42\1\44\1\55\1\50" + + "\1\56\1\53\1\6\1\62\1\74\1\63\1\71\41\7\2\0\4\6" + + "\4\0\1\6\2\0\1\7\7\0\1\6\4\0\1\6\5\0\27\6" + + "\1\0\37\6\1\0\u01ca\6\4\0\14\6\16\0\5\6\7\0\1\6" + + "\1\0\1\6\21\0\160\7\5\6\1\0\2\6\2\0\4\6\10\0" + + "\1\6\1\0\3\6\1\0\1\6\1\0\24\6\1\0\123\6\1\0" + + "\213\6\1\0\5\7\2\0\236\6\11\0\46\6\2\0\1\6\7\0" + + "\47\6\11\0\55\7\1\0\1\7\1\0\2\7\1\0\2\7\1\0" + + "\1\7\10\0\33\6\5\0\3\6\15\0\4\7\7\0\1\6\4\0" + + "\13\7\5\0\53\6\37\7\4\0\2\6\1\7\143\6\1\0\1\6" + + "\10\7\1\0\6\7\2\6\2\7\1\0\4\7\2\6\12\7\3\6" + + "\2\0\1\6\17\0\1\7\1\6\1\7\36\6\33\7\2\0\131\6" + + "\13\7\1\6\16\0\12\7\41\6\11\7\2\6\4\0\1\6\5\0" + + "\26\6\4\7\1\6\11\7\1\6\3\7\1\6\5\7\22\0\31\6" + + "\3\7\244\0\4\7\66\6\3\7\1\6\22\7\1\6\7\7\12\6" + + "\2\7\2\0\12\7\1\0\7\6\1\0\7\6\1\0\3\7\1\0" + + "\10\6\2\0\2\6\2\0\26\6\1\0\7\6\1\0\1\6\3\0" + + "\4\6\2\0\1\7\1\6\7\7\2\0\2\7\2\0\3\7\1\6" + + "\10\0\1\7\4\0\2\6\1\0\3\6\2\7\2\0\12\7\4\6" + + "\7\0\1\6\5\0\3\7\1\0\6\6\4\0\2\6\2\0\26\6" + + "\1\0\7\6\1\0\2\6\1\0\2\6\1\0\2\6\2\0\1\7" + + "\1\0\5\7\4\0\2\7\2\0\3\7\3\0\1\7\7\0\4\6" + + "\1\0\1\6\7\0\14\7\3\6\1\7\13\0\3\7\1\0\11\6" + + "\1\0\3\6\1\0\26\6\1\0\7\6\1\0\2\6\1\0\5\6" + + "\2\0\1\7\1\6\10\7\1\0\3\7\1\0\3\7\2\0\1\6" + + "\17\0\2\6\2\7\2\0\12\7\1\0\1\6\17\0\3\7\1\0" + + "\10\6\2\0\2\6\2\0\26\6\1\0\7\6\1\0\2\6\1\0" + + "\5\6\2\0\1\7\1\6\7\7\2\0\2\7\2\0\3\7\10\0" + + "\2\7\4\0\2\6\1\0\3\6\2\7\2\0\12\7\1\0\1\6" + + "\20\0\1\7\1\6\1\0\6\6\3\0\3\6\1\0\4\6\3\0" + + "\2\6\1\0\1\6\1\0\2\6\3\0\2\6\3\0\3\6\3\0" + + "\14\6\4\0\5\7\3\0\3\7\1\0\4\7\2\0\1\6\6\0" + + "\1\7\16\0\12\7\11\0\1\6\7\0\3\7\1\0\10\6\1\0" + + "\3\6\1\0\27\6\1\0\12\6\1\0\5\6\3\0\1\6\7\7" + + "\1\0\3\7\1\0\4\7\7\0\2\7\1\0\2\6\6\0\2\6" + + "\2\7\2\0\12\7\22\0\2\7\1\0\10\6\1\0\3\6\1\0" + + "\27\6\1\0\12\6\1\0\5\6\2\0\1\7\1\6\7\7\1\0" + + "\3\7\1\0\4\7\7\0\2\7\7\0\1\6\1\0\2\6\2\7" + + "\2\0\12\7\1\0\2\6\17\0\2\7\1\0\10\6\1\0\3\6" + + "\1\0\51\6\2\0\1\6\7\7\1\0\3\7\1\0\4\7\1\6" + + "\10\0\1\7\10\0\2\6\2\7\2\0\12\7\12\0\6\6\2\0" + + "\2\7\1\0\22\6\3\0\30\6\1\0\11\6\1\0\1\6\2\0" + + "\7\6\3\0\1\7\4\0\6\7\1\0\1\7\1\0\10\7\22\0" + + "\2\7\15\0\60\6\1\7\2\6\7\7\4\0\10\6\10\7\1\0" + + "\12\7\47\0\2\6\1\0\1\6\2\0\2\6\1\0\1\6\2\0" + + "\1\6\6\0\4\6\1\0\7\6\1\0\3\6\1\0\1\6\1\0" + + "\1\6\2\0\2\6\1\0\4\6\1\7\2\6\6\7\1\0\2\7" + + "\1\6\2\0\5\6\1\0\1\6\1\0\6\7\2\0\12\7\2\0" + + "\2\6\42\0\1\6\27\0\2\7\6\0\12\7\13\0\1\7\1\0" + + "\1\7\1\0\1\7\4\0\2\7\10\6\1\0\44\6\4\0\24\7" + + "\1\0\2\7\5\6\13\7\1\0\44\7\11\0\1\7\71\0\53\6" + + "\24\7\1\6\12\7\6\0\6\6\4\7\4\6\3\7\1\6\3\7" + + "\2\6\7\7\3\6\4\7\15\6\14\7\1\6\17\7\2\0\46\6" + + "\12\0\53\6\1\0\1\6\3\0\u0149\6\1\0\4\6\2\0\7\6" + + "\1\0\1\6\1\0\4\6\2\0\51\6\1\0\4\6\2\0\41\6" + + "\1\0\4\6\2\0\7\6\1\0\1\6\1\0\4\6\2\0\17\6" + + "\1\0\71\6\1\0\4\6\2\0\103\6\2\0\3\7\40\0\20\6" + + "\20\0\125\6\14\0\u026c\6\2\0\21\6\1\0\32\6\5\0\113\6" + + "\3\0\3\6\17\0\15\6\1\0\4\6\3\7\13\0\22\6\3\7" + + "\13\0\22\6\2\7\14\0\15\6\1\0\3\6\1\0\2\7\14\0" + + "\64\6\40\7\3\0\1\6\3\0\2\6\1\7\2\0\12\7\41\0" + + "\3\7\2\0\12\7\6\0\130\6\10\0\51\6\1\7\1\6\5\0" + + "\106\6\12\0\35\6\3\0\14\7\4\0\14\7\12\0\12\7\36\6" + + "\2\0\5\6\13\0\54\6\4\0\21\7\7\6\2\7\6\0\12\7" + + "\46\0\27\6\5\7\4\0\65\6\12\7\1\0\35\7\2\0\13\7" + + "\6\0\12\7\15\0\1\6\130\0\5\7\57\6\21\7\7\6\4\0" + + "\12\7\21\0\11\7\14\0\3\7\36\6\12\7\3\0\2\6\12\7" + + "\6\0\46\6\16\7\14\0\44\6\24\7\10\0\12\7\3\0\3\6" + + "\12\7\44\6\122\0\3\7\1\0\25\7\4\6\1\7\4\6\1\7" + + "\15\0\300\6\47\7\25\0\4\7\u0116\6\2\0\6\6\2\0\46\6" + + "\2\0\6\6\2\0\10\6\1\0\1\6\1\0\1\6\1\0\1\6" + + "\1\0\37\6\2\0\65\6\1\0\7\6\1\0\1\6\3\0\3\6" + + "\1\0\7\6\3\0\4\6\2\0\6\6\4\0\15\6\5\0\3\6" + + "\1\0\7\6\16\0\5\7\32\0\5\7\20\0\2\6\23\0\1\6" + + "\13\0\5\7\5\0\6\7\1\0\1\6\15\0\1\6\20\0\15\6" + + "\3\0\32\6\26\0\15\7\4\0\1\7\3\0\14\7\21\0\1\6" + + "\4\0\1\6\2\0\12\6\1\0\1\6\3\0\5\6\6\0\1\6" + + "\1\0\1\6\1\0\1\6\1\0\4\6\1\0\13\6\2\0\4\6" + + "\5\0\5\6\4\0\1\6\21\0\51\6\u0a77\0\57\6\1\0\57\6" + + "\1\0\205\6\6\0\4\6\3\7\16\0\46\6\12\0\66\6\11\0" + + "\1\6\17\0\1\7\27\6\11\0\7\6\1\0\7\6\1\0\7\6" + + "\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6" + + "\1\0\40\7\57\0\1\6\u01d5\0\3\6\31\0\11\6\6\7\1\0" + + "\5\6\2\0\5\6\4\0\126\6\2\0\2\7\2\0\3\6\1\0" + + "\132\6\1\0\4\6\5\0\51\6\3\0\136\6\21\0\33\6\65\0" + + "\20\6\u0200\0\u19b6\6\112\0\u51cc\6\64\0\u048d\6\103\0\56\6\2\0" + + "\u010d\6\3\0\20\6\12\7\2\6\24\0\57\6\1\7\14\0\2\7" + + "\1\0\31\6\10\0\120\6\2\7\45\0\11\6\2\0\147\6\2\0" + + "\4\6\1\0\2\6\16\0\12\6\120\0\10\6\1\7\3\6\1\7" + + "\4\6\1\7\27\6\5\7\20\0\1\6\7\0\64\6\14\0\2\7" + + "\62\6\21\7\13\0\12\7\6\0\22\7\6\6\3\0\1\6\4\0" + + "\12\7\34\6\10\7\2\0\27\6\15\7\14\0\35\6\3\0\4\7" + + "\57\6\16\7\16\0\1\6\12\7\46\0\51\6\16\7\11\0\3\6" + + "\1\7\10\6\2\7\2\0\12\7\6\0\27\6\3\0\1\6\1\7" + + "\4\0\60\6\1\7\1\6\3\7\2\6\2\7\5\6\2\7\1\6" + + "\1\7\1\6\30\0\3\6\43\0\6\6\2\0\6\6\2\0\6\6" + + "\11\0\7\6\1\0\7\6\221\0\43\6\10\7\1\0\2\7\2\0" + + "\12\7\6\0\u2ba4\6\14\0\27\6\4\0\61\6\u2104\0\u012e\6\2\0" + + "\76\6\2\0\152\6\46\0\7\6\14\0\5\6\5\0\1\6\1\7" + + "\12\6\1\0\15\6\1\0\5\6\1\0\1\6\1\0\2\6\1\0" + + "\2\6\1\0\154\6\41\0\u016b\6\22\0\100\6\2\0\66\6\50\0" + + "\15\6\3\0\20\7\20\0\7\7\14\0\2\6\30\0\3\6\31\0" + + "\1\6\6\0\5\6\1\0\207\6\2\0\1\7\4\0\1\6\13\0" + + "\12\7\7\0\32\6\4\0\1\6\1\0\32\6\13\0\131\6\3\0" + + "\6\6\2\0\6\6\2\0\6\6\2\0\3\6\3\0\2\6\3\0" + + "\2\6\22\0\3\7\4\0"; + /** + * 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(); + 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" + + "\21\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" + + "\1\37\1\40\1\41\2\42\1\43\1\1\1\41\2\44" + + "\1\41\1\1\1\45\3\41\1\3\1\0\1\46\1\47" + + "\1\50\2\0\1\51\1\0\1\52\1\53\1\54\1\55" + + "\1\56\1\57\1\51\1\0\2\57\1\0\1\60\1\61" + + "\5\6\1\62\16\6\1\63\1\64\1\65\3\6\1\66" + + "\15\6\1\67\1\70\1\71\1\72\1\73\1\74\1\75" + + "\1\76\1\77\1\100\1\101\2\102\1\103\1\104\1\105" + + "\1\106\1\107\1\110\1\111\6\0\2\3\2\0\1\112" + + "\3\0\1\113\1\0\1\114\1\115\1\116\1\117\2\120" + + "\1\57\1\51\1\0\11\6\1\121\4\6\1\122\3\6" + + "\1\123\6\6\1\124\4\6\1\125\10\6\1\126\1\6" + + "\1\127\1\130\1\102\7\0\1\131\5\0\1\132\1\120" + + "\1\57\2\6\1\133\1\134\1\6\1\135\11\6\1\136" + + "\1\137\1\6\1\140\13\6\1\141\5\6\1\142\1\41" + + "\1\0\1\143\12\0\1\120\1\57\1\144\2\6\1\145" + + "\1\146\1\6\1\147\1\6\1\150\3\6\1\151\10\6" + + "\1\152\2\6\1\153\4\6\10\0\1\120\1\57\1\154" + + "\2\6\1\155\1\156\2\6\1\157\3\6\1\160\2\6" + + "\1\161\6\6\1\162\2\0\1\113\1\120\1\57\1\163" + + "\7\6\1\164\1\165\1\166\2\6\1\167\1\170\1\41" + + "\1\120\1\57\1\171\1\172\2\6\1\173\2\6\1\174" + + "\1\6\1\120\1\57\1\175\1\6\1\176\1\6\1\177" + + "\1\120\1\57\1\200\1\201\6\57"; - /** initial size of the lookahead buffer */ - private static final int ZZ_BUFFERSIZE = 16384; - - /** lexical states */ - public static final int XML = 8; - public static final int XMLSTARTTAG = 6; - public static final int STRING = 2; - public static final int YYINITIAL = 0; - public static final int CHARLITERAL = 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, 3, 3, 4, 4 - }; - - /** - * 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\70"+ - "\1\16\1\0\1\6\1\77\1\73\1\30\1\60\1\61\1\5\1\75"+ - "\1\67\1\26\1\11\1\4\1\17\3\23\4\24\2\20\1\10\1\66"+ - "\1\12\1\15\1\13\1\72\1\100\4\22\1\25\1\22\21\6\1\21"+ - "\2\6\1\64\1\27\1\65\1\76\1\6\1\0\1\34\1\31\1\36"+ - "\1\45\1\33\1\46\1\57\1\51\1\43\1\6\1\35\1\47\1\54"+ - "\1\41\1\40\1\52\1\6\1\32\1\37\1\42\1\44\1\55\1\50"+ - "\1\56\1\53\1\6\1\62\1\74\1\63\1\71\41\7\2\0\4\6"+ - "\4\0\1\6\2\0\1\7\7\0\1\6\4\0\1\6\5\0\27\6"+ - "\1\0\37\6\1\0\u01ca\6\4\0\14\6\16\0\5\6\7\0\1\6"+ - "\1\0\1\6\21\0\160\7\5\6\1\0\2\6\2\0\4\6\10\0"+ - "\1\6\1\0\3\6\1\0\1\6\1\0\24\6\1\0\123\6\1\0"+ - "\213\6\1\0\5\7\2\0\236\6\11\0\46\6\2\0\1\6\7\0"+ - "\47\6\11\0\55\7\1\0\1\7\1\0\2\7\1\0\2\7\1\0"+ - "\1\7\10\0\33\6\5\0\3\6\15\0\4\7\7\0\1\6\4\0"+ - "\13\7\5\0\53\6\37\7\4\0\2\6\1\7\143\6\1\0\1\6"+ - "\10\7\1\0\6\7\2\6\2\7\1\0\4\7\2\6\12\7\3\6"+ - "\2\0\1\6\17\0\1\7\1\6\1\7\36\6\33\7\2\0\131\6"+ - "\13\7\1\6\16\0\12\7\41\6\11\7\2\6\4\0\1\6\5\0"+ - "\26\6\4\7\1\6\11\7\1\6\3\7\1\6\5\7\22\0\31\6"+ - "\3\7\244\0\4\7\66\6\3\7\1\6\22\7\1\6\7\7\12\6"+ - "\2\7\2\0\12\7\1\0\7\6\1\0\7\6\1\0\3\7\1\0"+ - "\10\6\2\0\2\6\2\0\26\6\1\0\7\6\1\0\1\6\3\0"+ - "\4\6\2\0\1\7\1\6\7\7\2\0\2\7\2\0\3\7\1\6"+ - "\10\0\1\7\4\0\2\6\1\0\3\6\2\7\2\0\12\7\4\6"+ - "\7\0\1\6\5\0\3\7\1\0\6\6\4\0\2\6\2\0\26\6"+ - "\1\0\7\6\1\0\2\6\1\0\2\6\1\0\2\6\2\0\1\7"+ - "\1\0\5\7\4\0\2\7\2\0\3\7\3\0\1\7\7\0\4\6"+ - "\1\0\1\6\7\0\14\7\3\6\1\7\13\0\3\7\1\0\11\6"+ - "\1\0\3\6\1\0\26\6\1\0\7\6\1\0\2\6\1\0\5\6"+ - "\2\0\1\7\1\6\10\7\1\0\3\7\1\0\3\7\2\0\1\6"+ - "\17\0\2\6\2\7\2\0\12\7\1\0\1\6\17\0\3\7\1\0"+ - "\10\6\2\0\2\6\2\0\26\6\1\0\7\6\1\0\2\6\1\0"+ - "\5\6\2\0\1\7\1\6\7\7\2\0\2\7\2\0\3\7\10\0"+ - "\2\7\4\0\2\6\1\0\3\6\2\7\2\0\12\7\1\0\1\6"+ - "\20\0\1\7\1\6\1\0\6\6\3\0\3\6\1\0\4\6\3\0"+ - "\2\6\1\0\1\6\1\0\2\6\3\0\2\6\3\0\3\6\3\0"+ - "\14\6\4\0\5\7\3\0\3\7\1\0\4\7\2\0\1\6\6\0"+ - "\1\7\16\0\12\7\11\0\1\6\7\0\3\7\1\0\10\6\1\0"+ - "\3\6\1\0\27\6\1\0\12\6\1\0\5\6\3\0\1\6\7\7"+ - "\1\0\3\7\1\0\4\7\7\0\2\7\1\0\2\6\6\0\2\6"+ - "\2\7\2\0\12\7\22\0\2\7\1\0\10\6\1\0\3\6\1\0"+ - "\27\6\1\0\12\6\1\0\5\6\2\0\1\7\1\6\7\7\1\0"+ - "\3\7\1\0\4\7\7\0\2\7\7\0\1\6\1\0\2\6\2\7"+ - "\2\0\12\7\1\0\2\6\17\0\2\7\1\0\10\6\1\0\3\6"+ - "\1\0\51\6\2\0\1\6\7\7\1\0\3\7\1\0\4\7\1\6"+ - "\10\0\1\7\10\0\2\6\2\7\2\0\12\7\12\0\6\6\2\0"+ - "\2\7\1\0\22\6\3\0\30\6\1\0\11\6\1\0\1\6\2\0"+ - "\7\6\3\0\1\7\4\0\6\7\1\0\1\7\1\0\10\7\22\0"+ - "\2\7\15\0\60\6\1\7\2\6\7\7\4\0\10\6\10\7\1\0"+ - "\12\7\47\0\2\6\1\0\1\6\2\0\2\6\1\0\1\6\2\0"+ - "\1\6\6\0\4\6\1\0\7\6\1\0\3\6\1\0\1\6\1\0"+ - "\1\6\2\0\2\6\1\0\4\6\1\7\2\6\6\7\1\0\2\7"+ - "\1\6\2\0\5\6\1\0\1\6\1\0\6\7\2\0\12\7\2\0"+ - "\2\6\42\0\1\6\27\0\2\7\6\0\12\7\13\0\1\7\1\0"+ - "\1\7\1\0\1\7\4\0\2\7\10\6\1\0\44\6\4\0\24\7"+ - "\1\0\2\7\5\6\13\7\1\0\44\7\11\0\1\7\71\0\53\6"+ - "\24\7\1\6\12\7\6\0\6\6\4\7\4\6\3\7\1\6\3\7"+ - "\2\6\7\7\3\6\4\7\15\6\14\7\1\6\17\7\2\0\46\6"+ - "\12\0\53\6\1\0\1\6\3\0\u0149\6\1\0\4\6\2\0\7\6"+ - "\1\0\1\6\1\0\4\6\2\0\51\6\1\0\4\6\2\0\41\6"+ - "\1\0\4\6\2\0\7\6\1\0\1\6\1\0\4\6\2\0\17\6"+ - "\1\0\71\6\1\0\4\6\2\0\103\6\2\0\3\7\40\0\20\6"+ - "\20\0\125\6\14\0\u026c\6\2\0\21\6\1\0\32\6\5\0\113\6"+ - "\3\0\3\6\17\0\15\6\1\0\4\6\3\7\13\0\22\6\3\7"+ - "\13\0\22\6\2\7\14\0\15\6\1\0\3\6\1\0\2\7\14\0"+ - "\64\6\40\7\3\0\1\6\3\0\2\6\1\7\2\0\12\7\41\0"+ - "\3\7\2\0\12\7\6\0\130\6\10\0\51\6\1\7\1\6\5\0"+ - "\106\6\12\0\35\6\3\0\14\7\4\0\14\7\12\0\12\7\36\6"+ - "\2\0\5\6\13\0\54\6\4\0\21\7\7\6\2\7\6\0\12\7"+ - "\46\0\27\6\5\7\4\0\65\6\12\7\1\0\35\7\2\0\13\7"+ - "\6\0\12\7\15\0\1\6\130\0\5\7\57\6\21\7\7\6\4\0"+ - "\12\7\21\0\11\7\14\0\3\7\36\6\12\7\3\0\2\6\12\7"+ - "\6\0\46\6\16\7\14\0\44\6\24\7\10\0\12\7\3\0\3\6"+ - "\12\7\44\6\122\0\3\7\1\0\25\7\4\6\1\7\4\6\1\7"+ - "\15\0\300\6\47\7\25\0\4\7\u0116\6\2\0\6\6\2\0\46\6"+ - "\2\0\6\6\2\0\10\6\1\0\1\6\1\0\1\6\1\0\1\6"+ - "\1\0\37\6\2\0\65\6\1\0\7\6\1\0\1\6\3\0\3\6"+ - "\1\0\7\6\3\0\4\6\2\0\6\6\4\0\15\6\5\0\3\6"+ - "\1\0\7\6\16\0\5\7\32\0\5\7\20\0\2\6\23\0\1\6"+ - "\13\0\5\7\5\0\6\7\1\0\1\6\15\0\1\6\20\0\15\6"+ - "\3\0\32\6\26\0\15\7\4\0\1\7\3\0\14\7\21\0\1\6"+ - "\4\0\1\6\2\0\12\6\1\0\1\6\3\0\5\6\6\0\1\6"+ - "\1\0\1\6\1\0\1\6\1\0\4\6\1\0\13\6\2\0\4\6"+ - "\5\0\5\6\4\0\1\6\21\0\51\6\u0a77\0\57\6\1\0\57\6"+ - "\1\0\205\6\6\0\4\6\3\7\16\0\46\6\12\0\66\6\11\0"+ - "\1\6\17\0\1\7\27\6\11\0\7\6\1\0\7\6\1\0\7\6"+ - "\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6"+ - "\1\0\40\7\57\0\1\6\u01d5\0\3\6\31\0\11\6\6\7\1\0"+ - "\5\6\2\0\5\6\4\0\126\6\2\0\2\7\2\0\3\6\1\0"+ - "\132\6\1\0\4\6\5\0\51\6\3\0\136\6\21\0\33\6\65\0"+ - "\20\6\u0200\0\u19b6\6\112\0\u51cc\6\64\0\u048d\6\103\0\56\6\2\0"+ - "\u010d\6\3\0\20\6\12\7\2\6\24\0\57\6\1\7\14\0\2\7"+ - "\1\0\31\6\10\0\120\6\2\7\45\0\11\6\2\0\147\6\2\0"+ - "\4\6\1\0\2\6\16\0\12\6\120\0\10\6\1\7\3\6\1\7"+ - "\4\6\1\7\27\6\5\7\20\0\1\6\7\0\64\6\14\0\2\7"+ - "\62\6\21\7\13\0\12\7\6\0\22\7\6\6\3\0\1\6\4\0"+ - "\12\7\34\6\10\7\2\0\27\6\15\7\14\0\35\6\3\0\4\7"+ - "\57\6\16\7\16\0\1\6\12\7\46\0\51\6\16\7\11\0\3\6"+ - "\1\7\10\6\2\7\2\0\12\7\6\0\27\6\3\0\1\6\1\7"+ - "\4\0\60\6\1\7\1\6\3\7\2\6\2\7\5\6\2\7\1\6"+ - "\1\7\1\6\30\0\3\6\43\0\6\6\2\0\6\6\2\0\6\6"+ - "\11\0\7\6\1\0\7\6\221\0\43\6\10\7\1\0\2\7\2\0"+ - "\12\7\6\0\u2ba4\6\14\0\27\6\4\0\61\6\u2104\0\u012e\6\2\0"+ - "\76\6\2\0\152\6\46\0\7\6\14\0\5\6\5\0\1\6\1\7"+ - "\12\6\1\0\15\6\1\0\5\6\1\0\1\6\1\0\2\6\1\0"+ - "\2\6\1\0\154\6\41\0\u016b\6\22\0\100\6\2\0\66\6\50\0"+ - "\15\6\3\0\20\7\20\0\7\7\14\0\2\6\30\0\3\6\31\0"+ - "\1\6\6\0\5\6\1\0\207\6\2\0\1\7\4\0\1\6\13\0"+ - "\12\7\7\0\32\6\4\0\1\6\1\0\32\6\13\0\131\6\3\0"+ - "\6\6\2\0\6\6\2\0\6\6\2\0\3\6\3\0\2\6\3\0"+ - "\2\6\22\0\3\7\4\0"; - - /** - * 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(); - - 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"+ - "\21\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"+ - "\1\37\1\40\1\41\2\42\1\43\1\1\1\41\2\44"+ - "\1\41\1\1\1\45\3\41\1\3\1\0\1\46\1\47"+ - "\1\50\2\0\1\51\1\0\1\52\1\53\1\54\1\55"+ - "\1\56\1\57\1\51\1\0\2\57\1\0\1\60\1\61"+ - "\5\6\1\62\16\6\1\63\1\64\1\65\3\6\1\66"+ - "\15\6\1\67\1\70\1\71\1\72\1\73\1\74\1\75"+ - "\1\76\1\77\1\100\1\101\2\102\1\103\1\104\1\105"+ - "\1\106\1\107\1\110\1\111\6\0\2\3\2\0\1\112"+ - "\3\0\1\113\1\0\1\114\1\115\1\116\1\117\2\120"+ - "\1\57\1\51\1\0\11\6\1\121\4\6\1\122\3\6"+ - "\1\123\6\6\1\124\4\6\1\125\10\6\1\126\1\6"+ - "\1\127\1\130\1\102\7\0\1\131\5\0\1\132\1\120"+ - "\1\57\2\6\1\133\1\134\1\6\1\135\11\6\1\136"+ - "\1\137\1\6\1\140\13\6\1\141\5\6\1\142\1\41"+ - "\1\0\1\143\12\0\1\120\1\57\1\144\2\6\1\145"+ - "\1\146\1\6\1\147\1\6\1\150\3\6\1\151\10\6"+ - "\1\152\2\6\1\153\4\6\10\0\1\120\1\57\1\154"+ - "\2\6\1\155\1\156\2\6\1\157\3\6\1\160\2\6"+ - "\1\161\6\6\1\162\2\0\1\113\1\120\1\57\1\163"+ - "\7\6\1\164\1\165\1\166\2\6\1\167\1\170\1\41"+ - "\1\120\1\57\1\171\1\172\2\6\1\173\2\6\1\174"+ - "\1\6\1\120\1\57\1\175\1\6\1\176\1\6\1\177"+ - "\1\120\1\57\1\200\1\201\6\57"; - - private static int [] zzUnpackAction() { - int [] result = new int[399]; - 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[399]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; } - return j; - } - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\101\0\202\0\303\0\u0104\0\u0145\0\u0186\0\u0145"+ - "\0\u01c7\0\u0208\0\u0249\0\u028a\0\u02cb\0\u030c\0\u034d\0\u038e"+ - "\0\u03cf\0\u0145\0\u0410\0\u0451\0\u0492\0\u0145\0\u04d3\0\u0514"+ - "\0\u0555\0\u0596\0\u05d7\0\u0618\0\u0659\0\u069a\0\u06db\0\u071c"+ - "\0\u075d\0\u079e\0\u07df\0\u0820\0\u0861\0\u08a2\0\u08e3\0\u0145"+ - "\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0924"+ - "\0\u0145\0\u0145\0\u0965\0\u09a6\0\u09e7\0\u0a28\0\u0a69\0\u0145"+ - "\0\u0aaa\0\u0aeb\0\u0145\0\u0145\0\u0b2c\0\u0b6d\0\u0bae\0\u0145"+ - "\0\u0bef\0\u0c30\0\u0145\0\u0c71\0\u0145\0\u0cb2\0\u0cf3\0\u0d34"+ - "\0\u0145\0\u0145\0\u0145\0\u0d75\0\u0db6\0\u0df7\0\u0e38\0\u0e79"+ - "\0\u0145\0\u0eba\0\u0145\0\u0efb\0\u0f3c\0\u0f7d\0\u0fbe\0\u0fff"+ - "\0\u1040\0\u1081\0\u0145\0\u0145\0\u10c2\0\u1103\0\u1144\0\u1185"+ - "\0\u11c6\0\u028a\0\u1207\0\u1248\0\u1289\0\u12ca\0\u130b\0\u134c"+ - "\0\u138d\0\u13ce\0\u140f\0\u1450\0\u1491\0\u14d2\0\u1513\0\u1554"+ - "\0\u028a\0\u1595\0\u028a\0\u15d6\0\u1617\0\u1658\0\u028a\0\u1699"+ - "\0\u16da\0\u171b\0\u175c\0\u179d\0\u17de\0\u181f\0\u1860\0\u18a1"+ - "\0\u18e2\0\u1923\0\u1964\0\u19a5\0\u19e6\0\u0145\0\u0145\0\u0145"+ - "\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u1a27"+ - "\0\u1a68\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145"+ - "\0\u0c30\0\u1aa9\0\u1aea\0\u1b2b\0\u1b6c\0\u1bad\0\u1bee\0\u0145"+ - "\0\u1c2f\0\u1c70\0\u0145\0\u1cb1\0\u1cf2\0\u1d33\0\u0145\0\u1d74"+ - "\0\u0145\0\u1db5\0\u0145\0\u0145\0\u0fbe\0\u1df6\0\u1e37\0\u1e78"+ - "\0\u1e78\0\u1eb9\0\u1efa\0\u1f3b\0\u1f7c\0\u1fbd\0\u1ffe\0\u203f"+ - "\0\u2080\0\u20c1\0\u028a\0\u2102\0\u2143\0\u2184\0\u21c5\0\u028a"+ - "\0\u2206\0\u2247\0\u2288\0\u028a\0\u22c9\0\u230a\0\u234b\0\u238c"+ - "\0\u23cd\0\u240e\0\u028a\0\u244f\0\u2490\0\u24d1\0\u2512\0\u028a"+ - "\0\u2553\0\u2594\0\u25d5\0\u2616\0\u2657\0\u2698\0\u26d9\0\u271a"+ - "\0\u028a\0\u275b\0\u028a\0\u0145\0\u0145\0\u279c\0\u27dd\0\u281e"+ - "\0\u285f\0\u28a0\0\u28e1\0\u2922\0\u0145\0\u2963\0\u29a4\0\u29e5"+ - "\0\u2a26\0\u2a67\0\u0145\0\u2aa8\0\u2ae9\0\u2b2a\0\u2b6b\0\u028a"+ - "\0\u028a\0\u2bac\0\u028a\0\u2bed\0\u2c2e\0\u2c6f\0\u2cb0\0\u2cf1"+ - "\0\u2d32\0\u2d73\0\u2db4\0\u2df5\0\u028a\0\u028a\0\u2e36\0\u028a"+ - "\0\u2e77\0\u2eb8\0\u2ef9\0\u2f3a\0\u2f7b\0\u2fbc\0\u2ffd\0\u303e"+ - "\0\u307f\0\u30c0\0\u3101\0\u028a\0\u3142\0\u3183\0\u31c4\0\u3205"+ - "\0\u3246\0\u028a\0\u3287\0\u32c8\0\u0145\0\u3309\0\u334a\0\u338b"+ - "\0\u33cc\0\u340d\0\u344e\0\u348f\0\u34d0\0\u3511\0\u3552\0\u3593"+ - "\0\u35d4\0\u028a\0\u3615\0\u3656\0\u028a\0\u028a\0\u3697\0\u028a"+ - "\0\u36d8\0\u028a\0\u3719\0\u375a\0\u379b\0\u028a\0\u37dc\0\u381d"+ - "\0\u385e\0\u389f\0\u38e0\0\u3921\0\u3962\0\u39a3\0\u028a\0\u39e4"+ - "\0\u3a25\0\u028a\0\u3a66\0\u3aa7\0\u3ae8\0\u3b29\0\u3b6a\0\u3bab"+ - "\0\u3bec\0\u3c2d\0\u3c6e\0\u3caf\0\u3cf0\0\u3d31\0\u3d72\0\u3db3"+ - "\0\u028a\0\u3df4\0\u3e35\0\u028a\0\u028a\0\u3e76\0\u3eb7\0\u028a"+ - "\0\u3ef8\0\u3f39\0\u3f7a\0\u028a\0\u3fbb\0\u3ffc\0\u028a\0\u403d"+ - "\0\u407e\0\u40bf\0\u4100\0\u4141\0\u4182\0\u028a\0\u41c3\0\u4204"+ - "\0\u348f\0\u4245\0\u4286\0\u028a\0\u42c7\0\u4308\0\u4349\0\u438a"+ - "\0\u43cb\0\u440c\0\u444d\0\u028a\0\u028a\0\u028a\0\u448e\0\u44cf"+ - "\0\u028a\0\u028a\0\u3bec\0\u4510\0\u4551\0\u028a\0\u028a\0\u4592"+ - "\0\u45d3\0\u028a\0\u4614\0\u4655\0\u028a\0\u4696\0\u46d7\0\u4718"+ - "\0\u028a\0\u4759\0\u028a\0\u479a\0\u028a\0\u0145\0\u47db\0\u028a"+ - "\0\u028a\0\u481c\0\u485d\0\u489e\0\u48df\0\u4920\0\u0f7d"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[399]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; } - return j; - } + /** + * 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\101\0\202\0\303\0\u0104\0\u0145\0\u0186\0\u0145" + + "\0\u01c7\0\u0208\0\u0249\0\u028a\0\u02cb\0\u030c\0\u034d\0\u038e" + + "\0\u03cf\0\u0145\0\u0410\0\u0451\0\u0492\0\u0145\0\u04d3\0\u0514" + + "\0\u0555\0\u0596\0\u05d7\0\u0618\0\u0659\0\u069a\0\u06db\0\u071c" + + "\0\u075d\0\u079e\0\u07df\0\u0820\0\u0861\0\u08a2\0\u08e3\0\u0145" + + "\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0924" + + "\0\u0145\0\u0145\0\u0965\0\u09a6\0\u09e7\0\u0a28\0\u0a69\0\u0145" + + "\0\u0aaa\0\u0aeb\0\u0145\0\u0145\0\u0b2c\0\u0b6d\0\u0bae\0\u0145" + + "\0\u0bef\0\u0c30\0\u0145\0\u0c71\0\u0145\0\u0cb2\0\u0cf3\0\u0d34" + + "\0\u0145\0\u0145\0\u0145\0\u0d75\0\u0db6\0\u0df7\0\u0e38\0\u0e79" + + "\0\u0145\0\u0eba\0\u0145\0\u0efb\0\u0f3c\0\u0f7d\0\u0fbe\0\u0fff" + + "\0\u1040\0\u1081\0\u0145\0\u0145\0\u10c2\0\u1103\0\u1144\0\u1185" + + "\0\u11c6\0\u028a\0\u1207\0\u1248\0\u1289\0\u12ca\0\u130b\0\u134c" + + "\0\u138d\0\u13ce\0\u140f\0\u1450\0\u1491\0\u14d2\0\u1513\0\u1554" + + "\0\u028a\0\u1595\0\u028a\0\u15d6\0\u1617\0\u1658\0\u028a\0\u1699" + + "\0\u16da\0\u171b\0\u175c\0\u179d\0\u17de\0\u181f\0\u1860\0\u18a1" + + "\0\u18e2\0\u1923\0\u1964\0\u19a5\0\u19e6\0\u0145\0\u0145\0\u0145" + + "\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u1a27" + + "\0\u1a68\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145\0\u0145" + + "\0\u0c30\0\u1aa9\0\u1aea\0\u1b2b\0\u1b6c\0\u1bad\0\u1bee\0\u0145" + + "\0\u1c2f\0\u1c70\0\u0145\0\u1cb1\0\u1cf2\0\u1d33\0\u0145\0\u1d74" + + "\0\u0145\0\u1db5\0\u0145\0\u0145\0\u0fbe\0\u1df6\0\u1e37\0\u1e78" + + "\0\u1e78\0\u1eb9\0\u1efa\0\u1f3b\0\u1f7c\0\u1fbd\0\u1ffe\0\u203f" + + "\0\u2080\0\u20c1\0\u028a\0\u2102\0\u2143\0\u2184\0\u21c5\0\u028a" + + "\0\u2206\0\u2247\0\u2288\0\u028a\0\u22c9\0\u230a\0\u234b\0\u238c" + + "\0\u23cd\0\u240e\0\u028a\0\u244f\0\u2490\0\u24d1\0\u2512\0\u028a" + + "\0\u2553\0\u2594\0\u25d5\0\u2616\0\u2657\0\u2698\0\u26d9\0\u271a" + + "\0\u028a\0\u275b\0\u028a\0\u0145\0\u0145\0\u279c\0\u27dd\0\u281e" + + "\0\u285f\0\u28a0\0\u28e1\0\u2922\0\u0145\0\u2963\0\u29a4\0\u29e5" + + "\0\u2a26\0\u2a67\0\u0145\0\u2aa8\0\u2ae9\0\u2b2a\0\u2b6b\0\u028a" + + "\0\u028a\0\u2bac\0\u028a\0\u2bed\0\u2c2e\0\u2c6f\0\u2cb0\0\u2cf1" + + "\0\u2d32\0\u2d73\0\u2db4\0\u2df5\0\u028a\0\u028a\0\u2e36\0\u028a" + + "\0\u2e77\0\u2eb8\0\u2ef9\0\u2f3a\0\u2f7b\0\u2fbc\0\u2ffd\0\u303e" + + "\0\u307f\0\u30c0\0\u3101\0\u028a\0\u3142\0\u3183\0\u31c4\0\u3205" + + "\0\u3246\0\u028a\0\u3287\0\u32c8\0\u0145\0\u3309\0\u334a\0\u338b" + + "\0\u33cc\0\u340d\0\u344e\0\u348f\0\u34d0\0\u3511\0\u3552\0\u3593" + + "\0\u35d4\0\u028a\0\u3615\0\u3656\0\u028a\0\u028a\0\u3697\0\u028a" + + "\0\u36d8\0\u028a\0\u3719\0\u375a\0\u379b\0\u028a\0\u37dc\0\u381d" + + "\0\u385e\0\u389f\0\u38e0\0\u3921\0\u3962\0\u39a3\0\u028a\0\u39e4" + + "\0\u3a25\0\u028a\0\u3a66\0\u3aa7\0\u3ae8\0\u3b29\0\u3b6a\0\u3bab" + + "\0\u3bec\0\u3c2d\0\u3c6e\0\u3caf\0\u3cf0\0\u3d31\0\u3d72\0\u3db3" + + "\0\u028a\0\u3df4\0\u3e35\0\u028a\0\u028a\0\u3e76\0\u3eb7\0\u028a" + + "\0\u3ef8\0\u3f39\0\u3f7a\0\u028a\0\u3fbb\0\u3ffc\0\u028a\0\u403d" + + "\0\u407e\0\u40bf\0\u4100\0\u4141\0\u4182\0\u028a\0\u41c3\0\u4204" + + "\0\u348f\0\u4245\0\u4286\0\u028a\0\u42c7\0\u4308\0\u4349\0\u438a" + + "\0\u43cb\0\u440c\0\u444d\0\u028a\0\u028a\0\u028a\0\u448e\0\u44cf" + + "\0\u028a\0\u028a\0\u3bec\0\u4510\0\u4551\0\u028a\0\u028a\0\u4592" + + "\0\u45d3\0\u028a\0\u4614\0\u4655\0\u028a\0\u4696\0\u46d7\0\u4718" + + "\0\u028a\0\u4759\0\u028a\0\u479a\0\u028a\0\u0145\0\u47db\0\u028a" + + "\0\u028a\0\u481c\0\u485d\0\u489e\0\u48df\0\u4920\0\u0f7d"; - /** - * 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"+ - "\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"+ - "\1\37\1\40\1\41\1\42\1\43\1\14\1\44\1\14"+ - "\1\45\2\14\1\46\1\14\1\47\1\50\1\51\1\52"+ - "\1\53\1\54\1\55\1\56\1\57\1\60\1\61\1\62"+ - "\1\63\1\64\1\65\1\66\1\67\1\70\1\71\1\72"+ - "\1\73\13\71\1\74\10\71\1\75\51\71\1\76\1\72"+ - "\1\73\24\76\1\75\1\74\50\76\1\6\1\77\1\100"+ - "\1\101\2\6\1\102\4\6\1\103\1\104\4\6\2\102"+ - "\2\6\1\102\3\6\27\102\21\6\1\105\1\77\1\100"+ - "\7\105\1\106\66\105\103\0\1\10\101\0\1\11\10\0"+ - "\1\11\70\0\1\107\1\110\7\0\1\111\100\0\1\112"+ - "\71\0\2\14\7\0\7\14\3\0\27\14\31\0\1\113"+ - "\101\0\1\114\1\115\4\0\2\116\2\0\2\116\62\0"+ - "\1\117\3\0\1\120\2\0\1\121\3\0\2\117\2\0"+ - "\1\117\3\0\27\117\34\0\1\122\1\0\1\123\100\0"+ - "\1\124\74\0\1\116\5\0\1\125\1\126\1\127\1\0"+ - "\1\130\1\131\1\132\5\0\1\132\22\0\1\127\33\0"+ - "\1\116\5\0\2\24\2\0\2\24\1\132\5\0\1\132"+ - "\62\0\1\133\10\0\1\134\60\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\135\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\136\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\3\14\1\137\12\14\1\140\6\14\1\141\1\14"+ - "\27\0\2\14\7\0\7\14\3\0\6\14\1\142\20\14"+ - "\27\0\2\14\7\0\7\14\3\0\3\14\1\143\3\14"+ - "\1\144\6\14\1\145\10\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\146\6\14\1\147\1\14\1\150\3\14"+ - "\1\151\7\14\27\0\2\14\7\0\7\14\3\0\24\14"+ - "\1\152\2\14\27\0\2\14\7\0\7\14\3\0\2\14"+ - "\1\153\1\154\7\14\1\155\13\14\27\0\2\14\7\0"+ - "\7\14\3\0\1\14\1\156\16\14\1\157\1\14\1\160"+ - "\4\14\27\0\2\14\7\0\7\14\3\0\6\14\1\161"+ - "\1\14\1\162\4\14\1\163\5\14\1\164\3\14\27\0"+ - "\2\14\7\0\7\14\3\0\6\14\1\165\20\14\27\0"+ - "\2\14\7\0\7\14\3\0\2\14\1\166\4\14\1\167"+ - "\12\14\1\170\4\14\27\0\2\14\7\0\7\14\3\0"+ - "\3\14\1\171\3\14\1\172\2\14\1\173\1\174\13\14"+ - "\27\0\2\14\7\0\7\14\3\0\12\14\1\175\5\14"+ - "\1\176\6\14\27\0\2\14\7\0\7\14\3\0\1\14"+ - "\1\177\1\14\1\200\7\14\1\201\13\14\27\0\2\14"+ - "\7\0\7\14\3\0\3\14\1\202\3\14\1\203\17\14"+ - "\27\0\2\14\7\0\7\14\3\0\2\14\1\204\24\14"+ - "\36\0\1\205\100\0\1\206\55\0\1\207\22\0\1\210"+ - "\56\0\1\211\21\0\1\212\57\0\1\213\20\0\1\214"+ - "\100\0\1\215\63\0\1\71\2\0\13\71\1\0\10\71"+ - "\1\0\51\71\2\0\1\73\76\0\2\216\1\0\13\216"+ - "\1\217\1\220\3\216\1\220\1\221\2\216\1\222\1\223"+ - "\1\224\1\225\6\216\1\226\1\227\3\216\1\230\32\216"+ - "\1\76\2\0\24\76\2\0\50\76\2\0\1\100\101\0"+ - "\1\101\10\0\1\101\72\0\2\231\1\232\3\0\1\233"+ - "\1\234\1\0\7\231\3\0\27\231\24\0\1\101\2\0"+ - "\1\231\5\0\1\104\4\0\2\231\2\0\1\231\3\0"+ - "\27\231\25\0\1\235\1\0\1\236\12\0\2\236\2\0"+ - "\1\236\3\0\27\236\21\0\1\107\1\237\1\240\76\107"+ - "\5\241\1\242\73\241\11\0\1\243\75\0\1\244\12\0"+ - "\2\244\2\0\1\244\3\0\27\244\40\0\2\116\2\0"+ - "\2\116\1\132\5\0\1\132\53\0\1\245\1\117\1\246"+ - "\2\0\1\247\1\250\2\0\2\117\2\245\2\117\1\245"+ - "\3\0\27\245\36\0\1\251\76\0\1\252\1\0\1\253"+ - "\100\0\1\254\74\0\1\116\5\0\1\125\1\126\2\0"+ - "\1\130\1\131\1\132\5\0\1\132\56\0\1\116\5\0"+ - "\2\126\2\0\2\126\1\132\5\0\1\132\64\0\1\255"+ - "\1\256\1\0\4\256\3\0\1\256\1\0\2\256\1\0"+ - "\1\256\6\0\2\256\43\0\1\116\5\0\1\131\1\126"+ - "\2\0\2\131\1\132\5\0\1\132\56\0\1\116\5\0"+ - "\1\257\1\126\2\0\2\257\1\132\5\0\1\132\64\0"+ - "\2\260\2\0\2\260\1\0\1\261\46\0\1\261\11\0"+ - "\2\14\7\0\7\14\3\0\2\14\1\262\24\14\27\0"+ - "\2\14\7\0\7\14\3\0\11\14\1\263\15\14\27\0"+ - "\2\14\7\0\7\14\3\0\5\14\1\264\21\14\27\0"+ - "\2\14\7\0\7\14\3\0\6\14\1\265\20\14\27\0"+ - "\2\14\7\0\7\14\3\0\11\14\1\266\15\14\27\0"+ - "\2\14\7\0\7\14\3\0\6\14\1\267\2\14\1\270"+ - "\15\14\27\0\2\14\7\0\7\14\3\0\10\14\1\271"+ - "\16\14\27\0\2\14\7\0\7\14\3\0\3\14\1\272"+ - "\23\14\27\0\2\14\7\0\7\14\3\0\11\14\1\273"+ - "\15\14\27\0\2\14\7\0\7\14\3\0\3\14\1\274"+ - "\23\14\27\0\2\14\7\0\7\14\3\0\21\14\1\275"+ - "\5\14\27\0\2\14\7\0\7\14\3\0\12\14\1\276"+ - "\14\14\27\0\2\14\7\0\7\14\3\0\2\14\1\277"+ - "\24\14\27\0\2\14\7\0\7\14\3\0\17\14\1\300"+ - "\7\14\27\0\2\14\7\0\7\14\3\0\23\14\1\301"+ - "\3\14\27\0\2\14\7\0\7\14\3\0\16\14\1\302"+ - "\10\14\27\0\2\14\7\0\7\14\3\0\13\14\1\303"+ - "\6\14\1\304\4\14\27\0\2\14\7\0\7\14\3\0"+ - "\1\14\1\305\10\14\1\306\14\14\27\0\2\14\7\0"+ - "\7\14\3\0\21\14\1\307\5\14\27\0\2\14\7\0"+ - "\7\14\3\0\6\14\1\310\2\14\1\311\15\14\27\0"+ - "\2\14\7\0\7\14\3\0\21\14\1\312\5\14\27\0"+ - "\2\14\7\0\7\14\3\0\2\14\1\313\24\14\27\0"+ - "\2\14\7\0\7\14\3\0\15\14\1\314\1\315\10\14"+ - "\27\0\2\14\7\0\7\14\3\0\10\14\1\316\16\14"+ - "\27\0\2\14\7\0\7\14\3\0\16\14\1\317\10\14"+ - "\27\0\2\14\7\0\7\14\3\0\1\14\1\320\25\14"+ - "\27\0\2\14\7\0\7\14\3\0\10\14\1\321\16\14"+ - "\27\0\2\14\7\0\7\14\3\0\10\14\1\322\16\14"+ - "\27\0\2\14\7\0\7\14\3\0\11\14\1\323\15\14"+ - "\27\0\2\14\7\0\7\14\3\0\12\14\1\324\14\14"+ - "\27\0\2\14\7\0\7\14\3\0\7\14\1\325\2\14"+ - "\1\326\14\14\27\0\2\14\7\0\7\14\3\0\5\14"+ - "\1\327\21\14\27\0\2\14\7\0\7\14\3\0\1\330"+ - "\26\14\27\0\2\14\7\0\7\14\3\0\1\14\1\331"+ - "\25\14\27\0\2\14\7\0\7\14\3\0\12\14\1\332"+ - "\14\14\27\0\2\14\7\0\7\14\3\0\11\14\1\333"+ - "\15\14\36\0\1\334\102\0\1\221\3\0\2\221\73\0"+ - "\1\335\3\0\2\335\62\0\1\336\12\0\2\336\2\0"+ - "\1\336\3\0\27\336\35\0\1\233\1\234\77\0\1\234"+ - "\1\0\1\337\70\0\1\340\12\0\2\340\2\0\1\340"+ - "\3\0\27\340\27\0\1\341\1\236\1\342\2\0\1\105"+ - "\1\343\2\0\2\236\2\341\2\236\1\341\3\0\27\341"+ - "\23\0\1\240\76\0\5\241\1\344\73\241\4\0\1\240"+ - "\1\242\101\0\2\244\3\0\1\345\3\0\7\244\3\0"+ - "\27\244\27\0\2\245\1\346\2\0\1\247\1\347\1\350"+ - "\1\0\7\245\3\0\27\245\27\0\1\351\12\0\2\351"+ - "\2\0\1\351\3\0\27\351\27\0\1\352\5\0\1\250"+ - "\4\0\2\352\2\0\1\352\3\0\27\352\36\0\1\353"+ - "\102\0\2\354\1\0\4\354\3\0\1\354\1\0\2\354"+ - "\1\0\1\354\6\0\2\354\43\0\1\116\5\0\1\355"+ - "\1\126\2\0\2\355\1\132\5\0\1\132\64\0\2\260"+ - "\2\0\2\260\62\0\2\14\7\0\7\14\3\0\3\14"+ - "\1\356\23\14\27\0\2\14\7\0\7\14\3\0\13\14"+ - "\1\357\13\14\27\0\2\14\7\0\7\14\3\0\20\14"+ - "\1\360\6\14\27\0\2\14\7\0\7\14\3\0\2\14"+ - "\1\361\24\14\27\0\2\14\7\0\7\14\3\0\2\14"+ - "\1\362\24\14\27\0\2\14\7\0\7\14\3\0\2\14"+ - "\1\363\24\14\27\0\2\14\7\0\7\14\3\0\5\14"+ - "\1\364\21\14\27\0\2\14\7\0\7\14\3\0\6\14"+ - "\1\365\2\14\1\366\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\6\14\1\367\20\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\370\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\371\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\372\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\373\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\374\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\16\14\1\375\10\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\376\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\7\14\1\377\17\14\27\0\2\14\7\0\7\14"+ - "\3\0\6\14\1\u0100\20\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u0101\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u0102\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u0103\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\7\14\1\u0104\6\14\1\u0105\10\14\27\0\2\14"+ - "\7\0\7\14\3\0\3\14\1\u0106\23\14\27\0\2\14"+ - "\7\0\7\14\3\0\2\14\1\u0107\24\14\27\0\2\14"+ - "\7\0\7\14\3\0\3\14\1\u0108\23\14\27\0\2\14"+ - "\7\0\7\14\3\0\6\14\1\u0109\20\14\27\0\2\14"+ - "\7\0\7\14\3\0\3\14\1\u010a\23\14\27\0\2\14"+ - "\7\0\7\14\3\0\5\14\1\u010b\21\14\27\0\2\14"+ - "\7\0\7\14\3\0\20\14\1\u010c\6\14\27\0\2\14"+ - "\7\0\7\14\3\0\16\14\1\u010d\10\14\27\0\2\14"+ - "\7\0\7\14\3\0\11\14\1\u010e\15\14\27\0\2\14"+ - "\7\0\7\14\3\0\24\14\1\u010f\2\14\27\0\2\14"+ - "\7\0\7\14\3\0\4\14\1\u0110\22\14\27\0\2\14"+ - "\7\0\7\14\3\0\16\14\1\u0111\10\14\27\0\2\14"+ - "\7\0\7\14\3\0\14\14\1\u0112\12\14\27\0\2\336"+ - "\4\0\1\233\1\234\1\0\7\336\3\0\27\336\21\0"+ - "\1\337\2\0\13\337\1\u0113\62\337\6\0\2\340\1\u0114"+ - "\2\0\1\u0115\3\0\7\340\3\0\27\340\27\0\2\341"+ - "\1\u0116\2\0\1\105\1\u0117\1\u0118\1\0\7\341\3\0"+ - "\27\341\27\0\1\u0119\12\0\2\u0119\2\0\1\u0119\3\0"+ - "\27\u0119\27\0\1\u011a\5\0\1\343\4\0\2\u011a\2\0"+ - "\1\u011a\3\0\27\u011a\21\0\4\241\1\240\1\344\73\241"+ - "\6\0\1\u011b\12\0\2\u011b\2\0\1\u011b\3\0\27\u011b"+ - "\27\0\1\352\5\0\1\347\1\350\3\0\2\352\2\0"+ - "\1\352\3\0\27\352\35\0\1\350\1\0\1\u011c\70\0"+ - "\1\u011d\1\351\3\0\1\247\1\250\2\0\2\351\2\u011d"+ - "\2\351\1\u011d\3\0\27\u011d\27\0\2\352\1\u011e\3\0"+ - "\1\u011f\1\350\1\0\7\352\3\0\27\352\40\0\2\u0120"+ - "\1\0\4\u0120\3\0\1\u0120\1\0\2\u0120\1\0\1\u0120"+ - "\6\0\2\u0120\43\0\1\116\5\0\1\u0121\1\126\2\0"+ - "\2\u0121\1\132\5\0\1\132\53\0\2\14\7\0\7\14"+ - "\3\0\4\14\1\u0122\22\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\u0123\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\10\14\1\u0124\16\14\27\0\2\14\7\0\7\14"+ - "\3\0\20\14\1\u0125\6\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u0126\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\12\14\1\u0127\14\14\27\0\2\14\7\0\7\14"+ - "\3\0\6\14\1\u0128\20\14\27\0\2\14\7\0\7\14"+ - "\3\0\12\14\1\u0129\14\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\u012a\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\5\14\1\u012b\21\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\u012c\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\6\14\1\u012d\20\14\27\0\2\14\7\0\7\14"+ - "\3\0\17\14\1\u012e\7\14\27\0\2\14\7\0\7\14"+ - "\3\0\7\14\1\u012f\17\14\27\0\2\14\7\0\7\14"+ - "\3\0\3\14\1\u0130\23\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\u0131\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\1\14\1\u0132\25\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u0133\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\13\14\1\u0134\13\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u0135\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\23\14\1\u0136\3\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u0137\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\16\14\1\u0138\10\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u0139\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u013a\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u013b\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\3\14\1\u013c\23\14\27\0\2\14\7\0\7\14"+ - "\3\0\3\14\1\u013d\23\14\27\0\2\14\7\0\7\14"+ - "\3\0\12\14\1\u013e\14\14\21\0\1\337\2\0\11\337"+ - "\1\u0113\1\337\1\u0113\62\337\6\0\1\u013f\12\0\2\u013f"+ - "\2\0\1\u013f\3\0\27\u013f\27\0\1\u0140\12\0\2\u0140"+ - "\2\0\1\u0140\3\0\27\u0140\27\0\1\u011a\5\0\1\u0117"+ - "\1\u0118\3\0\2\u011a\2\0\1\u011a\3\0\27\u011a\35\0"+ - "\1\u0118\1\0\1\u0141\70\0\1\u0142\1\u0119\3\0\1\105"+ - "\1\343\2\0\2\u0119\2\u0142\2\u0119\1\u0142\3\0\27\u0142"+ - "\27\0\2\u011a\1\u0143\3\0\1\u0144\1\u0118\1\0\7\u011a"+ - "\3\0\27\u011a\27\0\1\u011d\1\u011b\3\0\1\247\1\347"+ - "\1\350\1\0\2\u011b\2\u011d\2\u011b\1\u011d\3\0\27\u011d"+ - "\21\0\1\u011c\2\0\13\u011c\1\u0145\62\u011c\6\0\2\u011d"+ - "\1\u011e\2\0\1\247\1\347\1\350\1\0\7\u011d\3\0"+ - "\27\u011d\27\0\1\u0146\12\0\2\u0146\2\0\1\u0146\3\0"+ - "\27\u0146\35\0\1\u011f\1\350\102\0\2\u0147\1\0\4\u0147"+ - "\3\0\1\u0147\1\0\2\u0147\1\0\1\u0147\6\0\2\u0147"+ - "\43\0\1\116\5\0\1\u0148\1\126\2\0\2\u0148\1\132"+ - "\5\0\1\132\53\0\2\14\7\0\7\14\3\0\10\14"+ - "\1\u0149\16\14\27\0\2\14\7\0\7\14\3\0\14\14"+ - "\1\u014a\12\14\27\0\2\14\7\0\7\14\3\0\10\14"+ - "\1\u014b\16\14\27\0\2\14\7\0\7\14\3\0\5\14"+ - "\1\u014c\21\14\27\0\2\14\7\0\7\14\3\0\20\14"+ - "\1\u014d\6\14\27\0\2\14\7\0\7\14\3\0\12\14"+ - "\1\u014e\14\14\27\0\2\14\7\0\7\14\3\0\21\14"+ - "\1\u014f\5\14\27\0\2\14\7\0\7\14\3\0\15\14"+ - "\1\u0150\11\14\27\0\2\14\7\0\7\14\3\0\10\14"+ - "\1\u0151\16\14\27\0\2\14\7\0\7\14\3\0\10\14"+ - "\1\u0152\4\14\1\u0153\11\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u0154\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\23\14\1\u0155\3\14\27\0\2\14\7\0\7\14"+ - "\3\0\16\14\1\u0156\10\14\27\0\2\14\7\0\7\14"+ - "\3\0\2\14\1\u0157\24\14\27\0\2\14\7\0\7\14"+ - "\3\0\12\14\1\u0158\14\14\27\0\2\14\7\0\7\14"+ - "\3\0\16\14\1\u0159\10\14\27\0\2\14\7\0\7\14"+ - "\3\0\12\14\1\u015a\14\14\27\0\2\14\7\0\7\14"+ - "\3\0\5\14\1\u015b\21\14\27\0\2\14\7\0\7\14"+ - "\3\0\11\14\1\u015c\15\14\27\0\2\14\7\0\7\14"+ - "\3\0\26\14\1\u015d\27\0\2\14\7\0\7\14\3\0"+ - "\5\14\1\u015e\21\14\27\0\2\u013f\3\0\1\u0115\3\0"+ - "\7\u013f\3\0\27\u013f\27\0\1\u0142\1\u0140\3\0\1\105"+ - "\1\u0117\1\u0118\1\0\2\u0140\2\u0142\2\u0140\1\u0142\3\0"+ - "\27\u0142\21\0\1\u0141\2\0\13\u0141\1\u015f\62\u0141\6\0"+ - "\2\u0142\1\u0143\2\0\1\105\1\u0117\1\u0118\1\0\7\u0142"+ - "\3\0\27\u0142\27\0\1\u0160\12\0\2\u0160\2\0\1\u0160"+ - "\3\0\27\u0160\35\0\1\u0144\1\u0118\63\0\1\u011c\2\0"+ - "\10\u011c\1\u0161\1\u0145\1\u011c\1\u0145\62\u011c\6\0\2\u0146"+ - "\4\0\1\u011f\1\350\1\0\7\u0146\3\0\27\u0146\40\0"+ - "\2\u0162\1\0\4\u0162\3\0\1\u0162\1\0\2\u0162\1\0"+ - "\1\u0162\6\0\2\u0162\43\0\1\116\5\0\1\u0163\1\126"+ - "\2\0\2\u0163\1\132\5\0\1\132\53\0\2\14\7\0"+ - "\7\14\3\0\6\14\1\u0164\20\14\27\0\2\14\7\0"+ - "\7\14\3\0\13\14\1\u0165\13\14\27\0\2\14\7\0"+ - "\7\14\3\0\14\14\1\u0166\12\14\27\0\2\14\7\0"+ - "\7\14\3\0\3\14\1\u0167\23\14\27\0\2\14\7\0"+ - "\7\14\3\0\5\14\1\u0168\21\14\27\0\2\14\7\0"+ - "\7\14\3\0\3\14\1\u0169\23\14\27\0\2\14\7\0"+ - "\7\14\3\0\3\14\1\u016a\23\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u016b\24\14\27\0\2\14\7\0"+ - "\7\14\3\0\11\14\1\u016c\15\14\27\0\2\14\7\0"+ - "\7\14\3\0\5\14\1\u016d\21\14\27\0\2\14\7\0"+ - "\7\14\3\0\22\14\1\u016e\4\14\27\0\2\14\7\0"+ - "\7\14\3\0\7\14\1\u016f\17\14\27\0\2\14\7\0"+ - "\7\14\3\0\11\14\1\u0170\15\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u0171\24\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u0172\24\14\21\0\1\u0141\2\0"+ - "\10\u0141\1\u0173\1\u015f\1\u0141\1\u015f\62\u0141\6\0\2\u0160"+ - "\4\0\1\u0144\1\u0118\1\0\7\u0160\3\0\27\u0160\40\0"+ - "\2\u0174\1\0\4\u0174\3\0\1\u0174\1\0\2\u0174\1\0"+ - "\1\u0174\6\0\2\u0174\43\0\1\116\5\0\1\u0175\1\126"+ - "\2\0\2\u0175\1\132\5\0\1\132\53\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u0176\24\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u0177\24\14\27\0\2\14\7\0"+ - "\7\14\3\0\5\14\1\u0178\21\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u0179\24\14\27\0\2\14\7\0"+ - "\7\14\3\0\16\14\1\u017a\10\14\27\0\2\14\7\0"+ - "\7\14\3\0\5\14\1\u017b\21\14\27\0\2\14\7\0"+ - "\7\14\3\0\10\14\1\u017c\16\14\27\0\2\14\7\0"+ - "\7\14\3\0\10\14\1\u017d\16\14\27\0\2\14\7\0"+ - "\7\14\3\0\2\14\1\u017e\24\14\40\0\2\u017f\1\0"+ - "\4\u017f\3\0\1\u017f\1\0\2\u017f\1\0\1\u017f\6\0"+ - "\2\u017f\43\0\1\116\5\0\1\u0180\1\126\2\0\2\u0180"+ - "\1\132\5\0\1\132\53\0\2\14\7\0\7\14\3\0"+ - "\2\14\1\u0181\24\14\27\0\2\14\7\0\7\14\3\0"+ - "\7\14\1\u0182\17\14\27\0\2\14\7\0\7\14\3\0"+ - "\2\14\1\u0183\24\14\27\0\2\14\7\0\7\14\3\0"+ - "\11\14\1\u0184\15\14\27\0\2\14\7\0\7\14\3\0"+ - "\14\14\1\u0185\12\14\40\0\2\u0186\1\0\4\u0186\3\0"+ - "\1\u0186\1\0\2\u0186\1\0\1\u0186\6\0\2\u0186\43\0"+ - "\1\116\5\0\1\u0187\1\126\2\0\2\u0187\1\132\5\0"+ - "\1\132\53\0\2\14\7\0\7\14\3\0\15\14\1\u0188"+ - "\11\14\27\0\2\14\7\0\7\14\3\0\6\14\1\u0189"+ - "\20\14\32\0\1\116\5\0\1\u018a\1\126\2\0\2\u018a"+ - "\1\132\5\0\1\132\56\0\1\116\5\0\1\u018b\1\126"+ - "\2\0\2\u018b\1\132\5\0\1\132\56\0\1\116\5\0"+ - "\1\u018c\1\126\2\0\2\u018c\1\132\5\0\1\132\56\0"+ - "\1\116\5\0\1\u018d\1\126\2\0\2\u018d\1\132\5\0"+ - "\1\132\56\0\1\116\5\0\1\u018e\1\126\2\0\2\u018e"+ - "\1\132\5\0\1\132\56\0\1\116\5\0\1\u018f\1\126"+ - "\2\0\2\u018f\1\132\5\0\1\132\45\0"; - - private static int [] zzUnpackTrans() { - int [] result = new int[18785]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); + private static int[] zzUnpackRowMap() { + int[] result = new int[399]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; } - return j; - } - - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; - - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\1\11\1\1\1\11\11\1\1\11\3\1\1\11"+ - "\21\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"+ - "\3\1\1\0\2\1\1\0\2\11\51\1\12\11\2\1"+ - "\7\11\6\0\1\1\1\11\2\0\1\11\3\0\1\11"+ - "\1\0\1\11\1\1\2\11\4\1\1\0\52\1\2\11"+ - "\7\0\1\11\5\0\1\11\50\1\1\0\1\11\12\0"+ - "\37\1\10\0\30\1\2\0\45\1\1\11\11\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[399]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; } - return j; - } + /** + * The 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" + + "\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" + + "\1\37\1\40\1\41\1\42\1\43\1\14\1\44\1\14" + + "\1\45\2\14\1\46\1\14\1\47\1\50\1\51\1\52" + + "\1\53\1\54\1\55\1\56\1\57\1\60\1\61\1\62" + + "\1\63\1\64\1\65\1\66\1\67\1\70\1\71\1\72" + + "\1\73\13\71\1\74\10\71\1\75\51\71\1\76\1\72" + + "\1\73\24\76\1\75\1\74\50\76\1\6\1\77\1\100" + + "\1\101\2\6\1\102\4\6\1\103\1\104\4\6\2\102" + + "\2\6\1\102\3\6\27\102\21\6\1\105\1\77\1\100" + + "\7\105\1\106\66\105\103\0\1\10\101\0\1\11\10\0" + + "\1\11\70\0\1\107\1\110\7\0\1\111\100\0\1\112" + + "\71\0\2\14\7\0\7\14\3\0\27\14\31\0\1\113" + + "\101\0\1\114\1\115\4\0\2\116\2\0\2\116\62\0" + + "\1\117\3\0\1\120\2\0\1\121\3\0\2\117\2\0" + + "\1\117\3\0\27\117\34\0\1\122\1\0\1\123\100\0" + + "\1\124\74\0\1\116\5\0\1\125\1\126\1\127\1\0" + + "\1\130\1\131\1\132\5\0\1\132\22\0\1\127\33\0" + + "\1\116\5\0\2\24\2\0\2\24\1\132\5\0\1\132" + + "\62\0\1\133\10\0\1\134\60\0\2\14\7\0\7\14" + + "\3\0\1\14\1\135\25\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\136\24\14\27\0\2\14\7\0\7\14" + + "\3\0\3\14\1\137\12\14\1\140\6\14\1\141\1\14" + + "\27\0\2\14\7\0\7\14\3\0\6\14\1\142\20\14" + + "\27\0\2\14\7\0\7\14\3\0\3\14\1\143\3\14" + + "\1\144\6\14\1\145\10\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\146\6\14\1\147\1\14\1\150\3\14" + + "\1\151\7\14\27\0\2\14\7\0\7\14\3\0\24\14" + + "\1\152\2\14\27\0\2\14\7\0\7\14\3\0\2\14" + + "\1\153\1\154\7\14\1\155\13\14\27\0\2\14\7\0" + + "\7\14\3\0\1\14\1\156\16\14\1\157\1\14\1\160" + + "\4\14\27\0\2\14\7\0\7\14\3\0\6\14\1\161" + + "\1\14\1\162\4\14\1\163\5\14\1\164\3\14\27\0" + + "\2\14\7\0\7\14\3\0\6\14\1\165\20\14\27\0" + + "\2\14\7\0\7\14\3\0\2\14\1\166\4\14\1\167" + + "\12\14\1\170\4\14\27\0\2\14\7\0\7\14\3\0" + + "\3\14\1\171\3\14\1\172\2\14\1\173\1\174\13\14" + + "\27\0\2\14\7\0\7\14\3\0\12\14\1\175\5\14" + + "\1\176\6\14\27\0\2\14\7\0\7\14\3\0\1\14" + + "\1\177\1\14\1\200\7\14\1\201\13\14\27\0\2\14" + + "\7\0\7\14\3\0\3\14\1\202\3\14\1\203\17\14" + + "\27\0\2\14\7\0\7\14\3\0\2\14\1\204\24\14" + + "\36\0\1\205\100\0\1\206\55\0\1\207\22\0\1\210" + + "\56\0\1\211\21\0\1\212\57\0\1\213\20\0\1\214" + + "\100\0\1\215\63\0\1\71\2\0\13\71\1\0\10\71" + + "\1\0\51\71\2\0\1\73\76\0\2\216\1\0\13\216" + + "\1\217\1\220\3\216\1\220\1\221\2\216\1\222\1\223" + + "\1\224\1\225\6\216\1\226\1\227\3\216\1\230\32\216" + + "\1\76\2\0\24\76\2\0\50\76\2\0\1\100\101\0" + + "\1\101\10\0\1\101\72\0\2\231\1\232\3\0\1\233" + + "\1\234\1\0\7\231\3\0\27\231\24\0\1\101\2\0" + + "\1\231\5\0\1\104\4\0\2\231\2\0\1\231\3\0" + + "\27\231\25\0\1\235\1\0\1\236\12\0\2\236\2\0" + + "\1\236\3\0\27\236\21\0\1\107\1\237\1\240\76\107" + + "\5\241\1\242\73\241\11\0\1\243\75\0\1\244\12\0" + + "\2\244\2\0\1\244\3\0\27\244\40\0\2\116\2\0" + + "\2\116\1\132\5\0\1\132\53\0\1\245\1\117\1\246" + + "\2\0\1\247\1\250\2\0\2\117\2\245\2\117\1\245" + + "\3\0\27\245\36\0\1\251\76\0\1\252\1\0\1\253" + + "\100\0\1\254\74\0\1\116\5\0\1\125\1\126\2\0" + + "\1\130\1\131\1\132\5\0\1\132\56\0\1\116\5\0" + + "\2\126\2\0\2\126\1\132\5\0\1\132\64\0\1\255" + + "\1\256\1\0\4\256\3\0\1\256\1\0\2\256\1\0" + + "\1\256\6\0\2\256\43\0\1\116\5\0\1\131\1\126" + + "\2\0\2\131\1\132\5\0\1\132\56\0\1\116\5\0" + + "\1\257\1\126\2\0\2\257\1\132\5\0\1\132\64\0" + + "\2\260\2\0\2\260\1\0\1\261\46\0\1\261\11\0" + + "\2\14\7\0\7\14\3\0\2\14\1\262\24\14\27\0" + + "\2\14\7\0\7\14\3\0\11\14\1\263\15\14\27\0" + + "\2\14\7\0\7\14\3\0\5\14\1\264\21\14\27\0" + + "\2\14\7\0\7\14\3\0\6\14\1\265\20\14\27\0" + + "\2\14\7\0\7\14\3\0\11\14\1\266\15\14\27\0" + + "\2\14\7\0\7\14\3\0\6\14\1\267\2\14\1\270" + + "\15\14\27\0\2\14\7\0\7\14\3\0\10\14\1\271" + + "\16\14\27\0\2\14\7\0\7\14\3\0\3\14\1\272" + + "\23\14\27\0\2\14\7\0\7\14\3\0\11\14\1\273" + + "\15\14\27\0\2\14\7\0\7\14\3\0\3\14\1\274" + + "\23\14\27\0\2\14\7\0\7\14\3\0\21\14\1\275" + + "\5\14\27\0\2\14\7\0\7\14\3\0\12\14\1\276" + + "\14\14\27\0\2\14\7\0\7\14\3\0\2\14\1\277" + + "\24\14\27\0\2\14\7\0\7\14\3\0\17\14\1\300" + + "\7\14\27\0\2\14\7\0\7\14\3\0\23\14\1\301" + + "\3\14\27\0\2\14\7\0\7\14\3\0\16\14\1\302" + + "\10\14\27\0\2\14\7\0\7\14\3\0\13\14\1\303" + + "\6\14\1\304\4\14\27\0\2\14\7\0\7\14\3\0" + + "\1\14\1\305\10\14\1\306\14\14\27\0\2\14\7\0" + + "\7\14\3\0\21\14\1\307\5\14\27\0\2\14\7\0" + + "\7\14\3\0\6\14\1\310\2\14\1\311\15\14\27\0" + + "\2\14\7\0\7\14\3\0\21\14\1\312\5\14\27\0" + + "\2\14\7\0\7\14\3\0\2\14\1\313\24\14\27\0" + + "\2\14\7\0\7\14\3\0\15\14\1\314\1\315\10\14" + + "\27\0\2\14\7\0\7\14\3\0\10\14\1\316\16\14" + + "\27\0\2\14\7\0\7\14\3\0\16\14\1\317\10\14" + + "\27\0\2\14\7\0\7\14\3\0\1\14\1\320\25\14" + + "\27\0\2\14\7\0\7\14\3\0\10\14\1\321\16\14" + + "\27\0\2\14\7\0\7\14\3\0\10\14\1\322\16\14" + + "\27\0\2\14\7\0\7\14\3\0\11\14\1\323\15\14" + + "\27\0\2\14\7\0\7\14\3\0\12\14\1\324\14\14" + + "\27\0\2\14\7\0\7\14\3\0\7\14\1\325\2\14" + + "\1\326\14\14\27\0\2\14\7\0\7\14\3\0\5\14" + + "\1\327\21\14\27\0\2\14\7\0\7\14\3\0\1\330" + + "\26\14\27\0\2\14\7\0\7\14\3\0\1\14\1\331" + + "\25\14\27\0\2\14\7\0\7\14\3\0\12\14\1\332" + + "\14\14\27\0\2\14\7\0\7\14\3\0\11\14\1\333" + + "\15\14\36\0\1\334\102\0\1\221\3\0\2\221\73\0" + + "\1\335\3\0\2\335\62\0\1\336\12\0\2\336\2\0" + + "\1\336\3\0\27\336\35\0\1\233\1\234\77\0\1\234" + + "\1\0\1\337\70\0\1\340\12\0\2\340\2\0\1\340" + + "\3\0\27\340\27\0\1\341\1\236\1\342\2\0\1\105" + + "\1\343\2\0\2\236\2\341\2\236\1\341\3\0\27\341" + + "\23\0\1\240\76\0\5\241\1\344\73\241\4\0\1\240" + + "\1\242\101\0\2\244\3\0\1\345\3\0\7\244\3\0" + + "\27\244\27\0\2\245\1\346\2\0\1\247\1\347\1\350" + + "\1\0\7\245\3\0\27\245\27\0\1\351\12\0\2\351" + + "\2\0\1\351\3\0\27\351\27\0\1\352\5\0\1\250" + + "\4\0\2\352\2\0\1\352\3\0\27\352\36\0\1\353" + + "\102\0\2\354\1\0\4\354\3\0\1\354\1\0\2\354" + + "\1\0\1\354\6\0\2\354\43\0\1\116\5\0\1\355" + + "\1\126\2\0\2\355\1\132\5\0\1\132\64\0\2\260" + + "\2\0\2\260\62\0\2\14\7\0\7\14\3\0\3\14" + + "\1\356\23\14\27\0\2\14\7\0\7\14\3\0\13\14" + + "\1\357\13\14\27\0\2\14\7\0\7\14\3\0\20\14" + + "\1\360\6\14\27\0\2\14\7\0\7\14\3\0\2\14" + + "\1\361\24\14\27\0\2\14\7\0\7\14\3\0\2\14" + + "\1\362\24\14\27\0\2\14\7\0\7\14\3\0\2\14" + + "\1\363\24\14\27\0\2\14\7\0\7\14\3\0\5\14" + + "\1\364\21\14\27\0\2\14\7\0\7\14\3\0\6\14" + + "\1\365\2\14\1\366\15\14\27\0\2\14\7\0\7\14" + + "\3\0\6\14\1\367\20\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\370\15\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\371\24\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\372\15\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\373\25\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\374\24\14\27\0\2\14\7\0\7\14" + + "\3\0\16\14\1\375\10\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\376\24\14\27\0\2\14\7\0\7\14" + + "\3\0\7\14\1\377\17\14\27\0\2\14\7\0\7\14" + + "\3\0\6\14\1\u0100\20\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u0101\24\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u0102\15\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u0103\24\14\27\0\2\14\7\0\7\14" + + "\3\0\7\14\1\u0104\6\14\1\u0105\10\14\27\0\2\14" + + "\7\0\7\14\3\0\3\14\1\u0106\23\14\27\0\2\14" + + "\7\0\7\14\3\0\2\14\1\u0107\24\14\27\0\2\14" + + "\7\0\7\14\3\0\3\14\1\u0108\23\14\27\0\2\14" + + "\7\0\7\14\3\0\6\14\1\u0109\20\14\27\0\2\14" + + "\7\0\7\14\3\0\3\14\1\u010a\23\14\27\0\2\14" + + "\7\0\7\14\3\0\5\14\1\u010b\21\14\27\0\2\14" + + "\7\0\7\14\3\0\20\14\1\u010c\6\14\27\0\2\14" + + "\7\0\7\14\3\0\16\14\1\u010d\10\14\27\0\2\14" + + "\7\0\7\14\3\0\11\14\1\u010e\15\14\27\0\2\14" + + "\7\0\7\14\3\0\24\14\1\u010f\2\14\27\0\2\14" + + "\7\0\7\14\3\0\4\14\1\u0110\22\14\27\0\2\14" + + "\7\0\7\14\3\0\16\14\1\u0111\10\14\27\0\2\14" + + "\7\0\7\14\3\0\14\14\1\u0112\12\14\27\0\2\336" + + "\4\0\1\233\1\234\1\0\7\336\3\0\27\336\21\0" + + "\1\337\2\0\13\337\1\u0113\62\337\6\0\2\340\1\u0114" + + "\2\0\1\u0115\3\0\7\340\3\0\27\340\27\0\2\341" + + "\1\u0116\2\0\1\105\1\u0117\1\u0118\1\0\7\341\3\0" + + "\27\341\27\0\1\u0119\12\0\2\u0119\2\0\1\u0119\3\0" + + "\27\u0119\27\0\1\u011a\5\0\1\343\4\0\2\u011a\2\0" + + "\1\u011a\3\0\27\u011a\21\0\4\241\1\240\1\344\73\241" + + "\6\0\1\u011b\12\0\2\u011b\2\0\1\u011b\3\0\27\u011b" + + "\27\0\1\352\5\0\1\347\1\350\3\0\2\352\2\0" + + "\1\352\3\0\27\352\35\0\1\350\1\0\1\u011c\70\0" + + "\1\u011d\1\351\3\0\1\247\1\250\2\0\2\351\2\u011d" + + "\2\351\1\u011d\3\0\27\u011d\27\0\2\352\1\u011e\3\0" + + "\1\u011f\1\350\1\0\7\352\3\0\27\352\40\0\2\u0120" + + "\1\0\4\u0120\3\0\1\u0120\1\0\2\u0120\1\0\1\u0120" + + "\6\0\2\u0120\43\0\1\116\5\0\1\u0121\1\126\2\0" + + "\2\u0121\1\132\5\0\1\132\53\0\2\14\7\0\7\14" + + "\3\0\4\14\1\u0122\22\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\u0123\25\14\27\0\2\14\7\0\7\14" + + "\3\0\10\14\1\u0124\16\14\27\0\2\14\7\0\7\14" + + "\3\0\20\14\1\u0125\6\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u0126\15\14\27\0\2\14\7\0\7\14" + + "\3\0\12\14\1\u0127\14\14\27\0\2\14\7\0\7\14" + + "\3\0\6\14\1\u0128\20\14\27\0\2\14\7\0\7\14" + + "\3\0\12\14\1\u0129\14\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\u012a\25\14\27\0\2\14\7\0\7\14" + + "\3\0\5\14\1\u012b\21\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\u012c\25\14\27\0\2\14\7\0\7\14" + + "\3\0\6\14\1\u012d\20\14\27\0\2\14\7\0\7\14" + + "\3\0\17\14\1\u012e\7\14\27\0\2\14\7\0\7\14" + + "\3\0\7\14\1\u012f\17\14\27\0\2\14\7\0\7\14" + + "\3\0\3\14\1\u0130\23\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\u0131\25\14\27\0\2\14\7\0\7\14" + + "\3\0\1\14\1\u0132\25\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u0133\24\14\27\0\2\14\7\0\7\14" + + "\3\0\13\14\1\u0134\13\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u0135\15\14\27\0\2\14\7\0\7\14" + + "\3\0\23\14\1\u0136\3\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u0137\24\14\27\0\2\14\7\0\7\14" + + "\3\0\16\14\1\u0138\10\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u0139\15\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u013a\24\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u013b\24\14\27\0\2\14\7\0\7\14" + + "\3\0\3\14\1\u013c\23\14\27\0\2\14\7\0\7\14" + + "\3\0\3\14\1\u013d\23\14\27\0\2\14\7\0\7\14" + + "\3\0\12\14\1\u013e\14\14\21\0\1\337\2\0\11\337" + + "\1\u0113\1\337\1\u0113\62\337\6\0\1\u013f\12\0\2\u013f" + + "\2\0\1\u013f\3\0\27\u013f\27\0\1\u0140\12\0\2\u0140" + + "\2\0\1\u0140\3\0\27\u0140\27\0\1\u011a\5\0\1\u0117" + + "\1\u0118\3\0\2\u011a\2\0\1\u011a\3\0\27\u011a\35\0" + + "\1\u0118\1\0\1\u0141\70\0\1\u0142\1\u0119\3\0\1\105" + + "\1\343\2\0\2\u0119\2\u0142\2\u0119\1\u0142\3\0\27\u0142" + + "\27\0\2\u011a\1\u0143\3\0\1\u0144\1\u0118\1\0\7\u011a" + + "\3\0\27\u011a\27\0\1\u011d\1\u011b\3\0\1\247\1\347" + + "\1\350\1\0\2\u011b\2\u011d\2\u011b\1\u011d\3\0\27\u011d" + + "\21\0\1\u011c\2\0\13\u011c\1\u0145\62\u011c\6\0\2\u011d" + + "\1\u011e\2\0\1\247\1\347\1\350\1\0\7\u011d\3\0" + + "\27\u011d\27\0\1\u0146\12\0\2\u0146\2\0\1\u0146\3\0" + + "\27\u0146\35\0\1\u011f\1\350\102\0\2\u0147\1\0\4\u0147" + + "\3\0\1\u0147\1\0\2\u0147\1\0\1\u0147\6\0\2\u0147" + + "\43\0\1\116\5\0\1\u0148\1\126\2\0\2\u0148\1\132" + + "\5\0\1\132\53\0\2\14\7\0\7\14\3\0\10\14" + + "\1\u0149\16\14\27\0\2\14\7\0\7\14\3\0\14\14" + + "\1\u014a\12\14\27\0\2\14\7\0\7\14\3\0\10\14" + + "\1\u014b\16\14\27\0\2\14\7\0\7\14\3\0\5\14" + + "\1\u014c\21\14\27\0\2\14\7\0\7\14\3\0\20\14" + + "\1\u014d\6\14\27\0\2\14\7\0\7\14\3\0\12\14" + + "\1\u014e\14\14\27\0\2\14\7\0\7\14\3\0\21\14" + + "\1\u014f\5\14\27\0\2\14\7\0\7\14\3\0\15\14" + + "\1\u0150\11\14\27\0\2\14\7\0\7\14\3\0\10\14" + + "\1\u0151\16\14\27\0\2\14\7\0\7\14\3\0\10\14" + + "\1\u0152\4\14\1\u0153\11\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u0154\15\14\27\0\2\14\7\0\7\14" + + "\3\0\23\14\1\u0155\3\14\27\0\2\14\7\0\7\14" + + "\3\0\16\14\1\u0156\10\14\27\0\2\14\7\0\7\14" + + "\3\0\2\14\1\u0157\24\14\27\0\2\14\7\0\7\14" + + "\3\0\12\14\1\u0158\14\14\27\0\2\14\7\0\7\14" + + "\3\0\16\14\1\u0159\10\14\27\0\2\14\7\0\7\14" + + "\3\0\12\14\1\u015a\14\14\27\0\2\14\7\0\7\14" + + "\3\0\5\14\1\u015b\21\14\27\0\2\14\7\0\7\14" + + "\3\0\11\14\1\u015c\15\14\27\0\2\14\7\0\7\14" + + "\3\0\26\14\1\u015d\27\0\2\14\7\0\7\14\3\0" + + "\5\14\1\u015e\21\14\27\0\2\u013f\3\0\1\u0115\3\0" + + "\7\u013f\3\0\27\u013f\27\0\1\u0142\1\u0140\3\0\1\105" + + "\1\u0117\1\u0118\1\0\2\u0140\2\u0142\2\u0140\1\u0142\3\0" + + "\27\u0142\21\0\1\u0141\2\0\13\u0141\1\u015f\62\u0141\6\0" + + "\2\u0142\1\u0143\2\0\1\105\1\u0117\1\u0118\1\0\7\u0142" + + "\3\0\27\u0142\27\0\1\u0160\12\0\2\u0160\2\0\1\u0160" + + "\3\0\27\u0160\35\0\1\u0144\1\u0118\63\0\1\u011c\2\0" + + "\10\u011c\1\u0161\1\u0145\1\u011c\1\u0145\62\u011c\6\0\2\u0146" + + "\4\0\1\u011f\1\350\1\0\7\u0146\3\0\27\u0146\40\0" + + "\2\u0162\1\0\4\u0162\3\0\1\u0162\1\0\2\u0162\1\0" + + "\1\u0162\6\0\2\u0162\43\0\1\116\5\0\1\u0163\1\126" + + "\2\0\2\u0163\1\132\5\0\1\132\53\0\2\14\7\0" + + "\7\14\3\0\6\14\1\u0164\20\14\27\0\2\14\7\0" + + "\7\14\3\0\13\14\1\u0165\13\14\27\0\2\14\7\0" + + "\7\14\3\0\14\14\1\u0166\12\14\27\0\2\14\7\0" + + "\7\14\3\0\3\14\1\u0167\23\14\27\0\2\14\7\0" + + "\7\14\3\0\5\14\1\u0168\21\14\27\0\2\14\7\0" + + "\7\14\3\0\3\14\1\u0169\23\14\27\0\2\14\7\0" + + "\7\14\3\0\3\14\1\u016a\23\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u016b\24\14\27\0\2\14\7\0" + + "\7\14\3\0\11\14\1\u016c\15\14\27\0\2\14\7\0" + + "\7\14\3\0\5\14\1\u016d\21\14\27\0\2\14\7\0" + + "\7\14\3\0\22\14\1\u016e\4\14\27\0\2\14\7\0" + + "\7\14\3\0\7\14\1\u016f\17\14\27\0\2\14\7\0" + + "\7\14\3\0\11\14\1\u0170\15\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u0171\24\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u0172\24\14\21\0\1\u0141\2\0" + + "\10\u0141\1\u0173\1\u015f\1\u0141\1\u015f\62\u0141\6\0\2\u0160" + + "\4\0\1\u0144\1\u0118\1\0\7\u0160\3\0\27\u0160\40\0" + + "\2\u0174\1\0\4\u0174\3\0\1\u0174\1\0\2\u0174\1\0" + + "\1\u0174\6\0\2\u0174\43\0\1\116\5\0\1\u0175\1\126" + + "\2\0\2\u0175\1\132\5\0\1\132\53\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u0176\24\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u0177\24\14\27\0\2\14\7\0" + + "\7\14\3\0\5\14\1\u0178\21\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u0179\24\14\27\0\2\14\7\0" + + "\7\14\3\0\16\14\1\u017a\10\14\27\0\2\14\7\0" + + "\7\14\3\0\5\14\1\u017b\21\14\27\0\2\14\7\0" + + "\7\14\3\0\10\14\1\u017c\16\14\27\0\2\14\7\0" + + "\7\14\3\0\10\14\1\u017d\16\14\27\0\2\14\7\0" + + "\7\14\3\0\2\14\1\u017e\24\14\40\0\2\u017f\1\0" + + "\4\u017f\3\0\1\u017f\1\0\2\u017f\1\0\1\u017f\6\0" + + "\2\u017f\43\0\1\116\5\0\1\u0180\1\126\2\0\2\u0180" + + "\1\132\5\0\1\132\53\0\2\14\7\0\7\14\3\0" + + "\2\14\1\u0181\24\14\27\0\2\14\7\0\7\14\3\0" + + "\7\14\1\u0182\17\14\27\0\2\14\7\0\7\14\3\0" + + "\2\14\1\u0183\24\14\27\0\2\14\7\0\7\14\3\0" + + "\11\14\1\u0184\15\14\27\0\2\14\7\0\7\14\3\0" + + "\14\14\1\u0185\12\14\40\0\2\u0186\1\0\4\u0186\3\0" + + "\1\u0186\1\0\2\u0186\1\0\1\u0186\6\0\2\u0186\43\0" + + "\1\116\5\0\1\u0187\1\126\2\0\2\u0187\1\132\5\0" + + "\1\132\53\0\2\14\7\0\7\14\3\0\15\14\1\u0188" + + "\11\14\27\0\2\14\7\0\7\14\3\0\6\14\1\u0189" + + "\20\14\32\0\1\116\5\0\1\u018a\1\126\2\0\2\u018a" + + "\1\132\5\0\1\132\56\0\1\116\5\0\1\u018b\1\126" + + "\2\0\2\u018b\1\132\5\0\1\132\56\0\1\116\5\0" + + "\1\u018c\1\126\2\0\2\u018c\1\132\5\0\1\132\56\0" + + "\1\116\5\0\1\u018d\1\126\2\0\2\u018d\1\132\5\0" + + "\1\132\56\0\1\116\5\0\1\u018e\1\126\2\0\2\u018e" + + "\1\132\5\0\1\132\56\0\1\116\5\0\1\u018f\1\126" + + "\2\0\2\u018f\1\132\5\0\1\132\45\0"; - /** the input device */ - private java.io.Reader zzReader; + private static int[] zzUnpackTrans() { + int[] result = new int[18785]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } - /** the current state of the DFA */ - private int zzState; + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /* 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" + }; + /** + * 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" + + "\21\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" + + "\3\1\1\0\2\1\1\0\2\11\51\1\12\11\2\1" + + "\7\11\6\0\1\1\1\11\2\0\1\11\3\0\1\11" + + "\1\0\1\11\1\1\2\11\4\1\1\0\52\1\2\11" + + "\7\0\1\11\5\0\1\11\50\1\1\0\1\11\12\0" + + "\37\1\10\0\30\1\2\0\45\1\1\11\11\1"; - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + private static int[] zzUnpackAttribute() { + int[] result = new int[399]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } - /** the textposition at the last accepting state */ - private int zzMarkedPos; - - /** the current text position in the buffer */ - private int zzCurrentPos; - - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; - - /** number of newlines encountered up to the start of the matched text */ - private int yyline; - - /** the number of characters up to the start of the matched text */ - private int yychar; - - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; - - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; - - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; - - /** denotes if the user-EOF-code has already been executed */ - private boolean zzEOFDone; - - /* user code: */ + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * the input device + */ + private java.io.Reader zzReader; + /** + * the current state of the DFA + */ + private int zzState; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + /* user code: */ StringBuffer string = new StringBuffer(); - - private static String xmlTagName=""; + private static String xmlTagName = ""; public int yychar() { return yychar; } - - private Stack pushedBack=new Stack(); + private Stack pushedBack = new Stack(); public int yyline() { - return yyline+1; + return yyline + 1; } public void pushback(ParsedSymbol symb) { @@ -747,862 +750,983 @@ public final class ActionScriptLexer { last = null; } ParsedSymbol last; - public ParsedSymbol lex() throws java.io.IOException, ParseException{ - if(!pushedBack.isEmpty()){ - return last=pushedBack.pop(); + + public ParsedSymbol lex() throws java.io.IOException, ParseException { + if (!pushedBack.isEmpty()) { + return last = pushedBack.pop(); } - return last=yylex(); + return last = yylex(); } - - - /** - * 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 ActionScriptLexer(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 ActionScriptLexer(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 < 2228) { - 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 ActionScriptLexer(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 ActionScriptLexer(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); - - if (numRead > 0) { - zzEndRead+= numRead; - return false; + /** + * 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 < 2228) { + 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 */ - 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; - - 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; - } + /** + * Closes the input stream. + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ + if (zzReader != null) { + zzReader.close(); } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 27: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BITAND,yytext()); - } - case 130: break; - case 58: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_BITOR,yytext()); - } - case 131: break; - case 60: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_PLUS,yytext()); - } - case 132: break; - case 104: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.SUPER,yytext()); - } - case 133: break; - case 108: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.RETURN,yytext()); - } - case 134: break; - case 20: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BRACKET_OPEN,yytext()); - } - case 135: break; - case 42: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SHIFT_LEFT,yytext()); - } - case 136: break; - case 11: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN,yytext()); - } - case 137: break; - case 99: - { string.append( yytext() ); - String endtagname=yytext(); - endtagname=endtagname.substring(2,endtagname.length()-1); - if(endtagname.equals(xmlTagName)){ - yybegin(YYINITIAL); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML, string.toString()); - } - } - case 138: break; - case 51: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.IS,yytext()); - } - case 139: break; - case 84: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.USE,yytext()); - } - case 140: break; - case 5: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MULTIPLY,yytext()); - } - case 141: break; - case 128: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.INSTANCEOF,yytext()); - } - case 142: break; - case 52: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IN,yytext()); - } - case 143: break; - case 124: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FUNCTION,yytext()); - } - case 144: break; - case 119: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PRIVATE,yytext()); - } - case 145: break; - case 22: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SEMICOLON,yytext()); - } - case 146: break; - case 98: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.VOID,yytext()); - } - case 147: break; - case 85: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FOR,yytext()); - } - case 148: break; - case 3: - { /*ignore*/ - } - case 149: break; - case 122: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.OVERRIDE,yytext()); - } - case 150: break; - case 94: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.NULL,yytext()); - } - case 151: break; - case 72: - { string.append( '\t' ); - } - case 152: break; - case 66: - { char val = (char) Integer.parseInt(yytext().substring(1),8); - string.append( val ); - } - case 153: break; - case 129: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IMPLEMENTS,yytext()); - } - case 154: break; - case 49: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DECREMENT,yytext()); - } - case 155: break; - case 18: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.CURLY_OPEN,yytext()); - } - case 156: break; - case 64: - { throw new ParseException("Illegal escape sequence \""+yytext()+"\"",yyline+1); - } - case 157: break; - case 59: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.OR,yytext()); - } - case 158: break; - case 10: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.GREATER_THAN,yytext()); - } - case 159: break; - case 34: - { yybegin(YYINITIAL); yyline++; - } - case 160: break; - case 105: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.THROW,yytext()); - } - case 161: break; - case 97: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.WITH,yytext()); - } - case 162: break; - case 75: - { string.setLength(0); - yybegin(XML); - String s=yytext(); - s=s.substring(1,s.length()-1); - if(s.contains(" ")){ - s=s.substring(0,s.indexOf(" ")); - } - xmlTagName = s; - string.append(yytext()); - } - case 163: break; - case 13: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,new Long(Long.parseLong((yytext())))); - } - case 164: break; - case 15: - { string.setLength(0); - yybegin(CHARLITERAL); - } - case 165: break; - case 54: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.DO,yytext()); - } - case 166: break; - case 53: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IF,yytext()); - } - case 167: break; - case 81: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.SET,yytext()); - } - case 168: break; - case 29: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PLUS,yytext()); - } - case 169: break; - case 21: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BRACKET_CLOSE,yytext()); - } - case 170: break; - case 102: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CONST,yytext()); - } - case 171: break; - case 71: - { string.append( '\n' ); - } - case 172: break; - case 76: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_SHIFT_LEFT,yytext()); - } - case 173: break; - case 43: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.LOWER_EQUAL,yytext()); - } - case 174: break; - case 56: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_BITAND,yytext()); - } - case 175: break; - case 41: - { return new ParsedSymbol(SymbolGroup.DOUBLE,SymbolType.DOUBLE,new Double(Double.parseDouble((yytext())))); - } - case 176: break; - case 87: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.GET,yytext()); - } - case 177: break; - case 35: - { yybegin(YYINITIAL); - // length also includes the trailing quote - return new ParsedSymbol(SymbolGroup.STRING,SymbolType.STRING,string.toString()); - } - case 178: break; - case 127: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PROTECTED,yytext()); - } - case 179: break; - case 113: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DELETE,yytext()); - } - case 180: break; - case 93: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CASE,yytext()); - } - case 181: break; - case 88: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.STRICT_NOT_EQUAL,yytext()); - } - case 182: break; - case 106: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FALSE,yytext()); - } - case 183: break; - case 4: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DIVIDE,yytext()); - } - case 184: break; - case 40: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NAMESPACE_OP,yytext()); - } - case 185: break; - case 17: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PARENT_CLOSE,yytext()); - } - case 186: break; - case 31: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MODULO,yytext()); - } - case 187: break; - case 117: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.DYNAMIC,yytext()); - } - case 188: break; - case 92: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.ELSE,yytext()); - } - case 189: break; - case 79: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.STRICT_EQUALS,yytext()); - } - case 190: break; - case 115: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.EXTENDS,yytext()); - } - case 191: break; - case 109: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.STATIC,yytext()); - } - case 192: break; - case 14: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MINUS,yytext()); - } - case 193: break; - case 82: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NEW,yytext()); - } - case 194: break; - case 19: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.CURLY_CLOSE,yytext()); - } - case 195: break; - case 91: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.EACH,yytext()); - } - case 196: break; - case 28: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BITOR,yytext()); - } - case 197: break; - case 112: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IMPORT,yytext()); - } - case 198: break; - case 70: - { string.append( '\r' ); - } - case 199: break; - case 26: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.TERNAR,yytext()); - } - case 200: break; - case 2: - { yyline++; - } - case 201: break; - case 86: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.VAR,yytext()); - } - case 202: break; - case 69: - { string.append( '\b' ); - } - case 203: break; - case 83: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.TRY,yytext()); - } - case 204: break; - case 46: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.EQUALS,yytext()); - } - case 205: break; - case 62: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_XOR,yytext()); - } - case 206: break; - case 101: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CATCH,yytext()); - } - case 207: break; - case 65: - { string.append( '\"' ); - } - case 208: break; - case 8: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DOT,yytext()); - } - case 209: break; - case 30: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.XOR,yytext()); - } - case 210: break; - case 9: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.LOWER_THAN,yytext()); - } - case 211: break; - case 78: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_SHIFT_RIGHT,yytext()); - } - case 212: break; - case 50: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.AS,yytext()); - } - case 213: break; - case 68: - { string.append( '\'' ); - } - case 214: break; - case 67: - { string.append( '\\' ); - } - case 215: break; - case 126: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.INTERFACE,yytext()); - } - case 216: break; - case 114: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PUBLIC,yytext()); - } - case 217: break; - case 107: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.WHILE,yytext()); - } - case 218: break; - case 38: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_DIVIDE,yytext()); - } - case 219: break; - case 120: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PACKAGE,yytext()); - } - case 220: break; - case 111: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.TYPEOF,yytext()); - } - case 221: break; - case 63: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MODULO,yytext()); - } - case 222: break; - case 110: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.SWITCH,yytext()); - } - case 223: break; - case 77: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.USHIFT_RIGHT,yytext()); - } - case 224: break; - case 123: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.INTERNAL,yytext()); - } - case 225: break; - case 37: - { yybegin(XML); string.append( yytext() ); - } - case 226: break; - case 116: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.DEFAULT,yytext()); - } - case 227: break; - case 32: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ATTRIBUTE,yytext()); - } - case 228: break; - case 16: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PARENT_OPEN,yytext()); - } - case 229: break; - case 44: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SHIFT_RIGHT,yytext()); - } - case 230: break; - case 103: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CLASS,yytext()); - } - case 231: break; - case 73: - { string.append( '\f' ); - } - case 232: break; - case 90: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_USHIFT_RIGHT,yytext()); - } - case 233: break; - case 39: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MULTIPLY,yytext()); - } - case 234: break; - case 80: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,new Long(Long.parseLong(yytext().substring(2),16))); - } - case 235: break; - case 95: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.TRUE,yytext()); - } - case 236: break; - case 23: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.COMMA,yytext()); - } - case 237: break; - case 74: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.REST,yytext()); - } - case 238: break; - case 61: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.INCREMENT,yytext()); - } - case 239: break; - case 47: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,new Long(Long.parseLong(yytext(),8))); - } - case 240: break; - case 33: - { string.append( yytext() ); - } - case 241: break; - case 12: - { string.setLength(0); - yybegin(STRING); - } - case 242: break; - case 100: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.BREAK,yytext()); - } - case 243: break; - case 57: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.AND,yytext()); - } - case 244: break; - case 7: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.COLON,yytext()); - } - case 245: break; - case 125: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.NAMESPACE,yytext()); - } - case 246: break; - case 121: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CONTINUE,yytext()); - } - case 247: break; - case 6: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.IDENTIFIER, yytext()); - } - case 248: break; - case 118: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FINALLY,yytext()); - } - case 249: break; - case 89: - { String t=yytext(); return new ParsedSymbol(SymbolGroup.TYPENAME,SymbolType.TYPENAME,t.substring(2,t.length()-1)); - } - case 250: break; - case 24: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NOT,yytext()); - } - case 251: break; - case 25: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NEGATE,yytext()); - } - case 252: break; - case 45: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.GREATER_EQUAL,yytext()); - } - case 253: break; - case 48: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MINUS,yytext()); - } - case 254: break; - case 55: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NOT_EQUAL,yytext()); - } - case 255: break; - case 36: - { string.append( yytext() ); yyline++; - } - case 256: break; - case 96: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.THIS,yytext()); - } - case 257: break; - case 1: - { - } - case 258: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ParsedSymbol(SymbolGroup.EOF,SymbolType.EOF,null); - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } } - } + + /** + * 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; + + 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 27: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITAND, yytext()); + } + case 130: + break; + case 58: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITOR, yytext()); + } + case 131: + break; + case 60: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_PLUS, yytext()); + } + case 132: + break; + case 104: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SUPER, yytext()); + } + case 133: + break; + case 108: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.RETURN, yytext()); + } + case 134: + break; + case 20: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_OPEN, yytext()); + } + case 135: + break; + case 42: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_LEFT, yytext()); + } + case 136: + break; + case 11: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN, yytext()); + } + case 137: + break; + case 99: { + string.append(yytext()); + String endtagname = yytext(); + endtagname = endtagname.substring(2, endtagname.length() - 1); + if (endtagname.equals(xmlTagName)) { + yybegin(YYINITIAL); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML, string.toString()); + } + } + case 138: + break; + case 51: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.IS, yytext()); + } + case 139: + break; + case 84: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.USE, yytext()); + } + case 140: + break; + case 5: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MULTIPLY, yytext()); + } + case 141: + break; + case 128: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INSTANCEOF, yytext()); + } + case 142: + break; + case 52: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IN, yytext()); + } + case 143: + break; + case 124: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FUNCTION, yytext()); + } + case 144: + break; + case 119: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PRIVATE, yytext()); + } + case 145: + break; + case 22: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SEMICOLON, yytext()); + } + case 146: + break; + case 98: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.VOID, yytext()); + } + case 147: + break; + case 85: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FOR, yytext()); + } + case 148: + break; + case 3: { /*ignore*/ + + } + case 149: + break; + case 122: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.OVERRIDE, yytext()); + } + case 150: + break; + case 94: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.NULL, yytext()); + } + case 151: + break; + case 72: { + string.append('\t'); + } + case 152: + break; + case 66: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 153: + break; + case 129: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPLEMENTS, yytext()); + } + case 154: + break; + case 49: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DECREMENT, yytext()); + } + case 155: + break; + case 18: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_OPEN, yytext()); + } + case 156: + break; + case 64: { + throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 157: + break; + case 59: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.OR, yytext()); + } + case 158: + break; + case 10: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext()); + } + case 159: + break; + case 34: { + yybegin(YYINITIAL); + yyline++; + } + case 160: + break; + case 105: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THROW, yytext()); + } + case 161: + break; + case 97: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WITH, yytext()); + } + case 162: + break; + case 75: { + string.setLength(0); + yybegin(XML); + String s = yytext(); + s = s.substring(1, s.length() - 1); + if (s.contains(" ")) { + s = s.substring(0, s.indexOf(" ")); + } + xmlTagName = s; + string.append(yytext()); + } + case 163: + break; + case 13: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, new Long(Long.parseLong((yytext())))); + } + case 164: + break; + case 15: { + string.setLength(0); + yybegin(CHARLITERAL); + } + case 165: + break; + case 54: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DO, yytext()); + } + case 166: + break; + case 53: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IF, yytext()); + } + case 167: + break; + case 81: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SET, yytext()); + } + case 168: + break; + case 29: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PLUS, yytext()); + } + case 169: + break; + case 21: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_CLOSE, yytext()); + } + case 170: + break; + case 102: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONST, yytext()); + } + case 171: + break; + case 71: { + string.append('\n'); + } + case 172: + break; + case 76: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_LEFT, yytext()); + } + case 173: + break; + case 43: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_EQUAL, yytext()); + } + case 174: + break; + case 56: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITAND, yytext()); + } + case 175: + break; + case 41: { + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, new Double(Double.parseDouble((yytext())))); + } + case 176: + break; + case 87: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.GET, yytext()); + } + case 177: + break; + case 35: { + yybegin(YYINITIAL); + // length also includes the trailing quote + return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, string.toString()); + } + case 178: + break; + case 127: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PROTECTED, yytext()); + } + case 179: + break; + case 113: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DELETE, yytext()); + } + case 180: + break; + case 93: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CASE, yytext()); + } + case 181: + break; + case 88: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_NOT_EQUAL, yytext()); + } + case 182: + break; + case 106: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FALSE, yytext()); + } + case 183: + break; + case 4: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DIVIDE, yytext()); + } + case 184: + break; + case 40: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NAMESPACE_OP, yytext()); + } + case 185: + break; + case 17: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_CLOSE, yytext()); + } + case 186: + break; + case 31: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MODULO, yytext()); + } + case 187: + break; + case 117: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DYNAMIC, yytext()); + } + case 188: + break; + case 92: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.ELSE, yytext()); + } + case 189: + break; + case 79: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_EQUALS, yytext()); + } + case 190: + break; + case 115: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.EXTENDS, yytext()); + } + case 191: + break; + case 109: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.STATIC, yytext()); + } + case 192: + break; + case 14: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MINUS, yytext()); + } + case 193: + break; + case 82: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEW, yytext()); + } + case 194: + break; + case 19: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_CLOSE, yytext()); + } + case 195: + break; + case 91: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.EACH, yytext()); + } + case 196: + break; + case 28: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITOR, yytext()); + } + case 197: + break; + case 112: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPORT, yytext()); + } + case 198: + break; + case 70: { + string.append('\r'); + } + case 199: + break; + case 26: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TERNAR, yytext()); + } + case 200: + break; + case 2: { + yyline++; + } + case 201: + break; + case 86: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.VAR, yytext()); + } + case 202: + break; + case 69: { + string.append('\b'); + } + case 203: + break; + case 83: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRY, yytext()); + } + case 204: + break; + case 46: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.EQUALS, yytext()); + } + case 205: + break; + case 62: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_XOR, yytext()); + } + case 206: + break; + case 101: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CATCH, yytext()); + } + case 207: + break; + case 65: { + string.append('\"'); + } + case 208: + break; + case 8: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DOT, yytext()); + } + case 209: + break; + case 30: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.XOR, yytext()); + } + case 210: + break; + case 9: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_THAN, yytext()); + } + case 211: + break; + case 78: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_RIGHT, yytext()); + } + case 212: + break; + case 50: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AS, yytext()); + } + case 213: + break; + case 68: { + string.append('\''); + } + case 214: + break; + case 67: { + string.append('\\'); + } + case 215: + break; + case 126: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERFACE, yytext()); + } + case 216: + break; + case 114: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PUBLIC, yytext()); + } + case 217: + break; + case 107: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WHILE, yytext()); + } + case 218: + break; + case 38: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_DIVIDE, yytext()); + } + case 219: + break; + case 120: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PACKAGE, yytext()); + } + case 220: + break; + case 111: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TYPEOF, yytext()); + } + case 221: + break; + case 63: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MODULO, yytext()); + } + case 222: + break; + case 110: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SWITCH, yytext()); + } + case 223: + break; + case 77: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.USHIFT_RIGHT, yytext()); + } + case 224: + break; + case 123: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERNAL, yytext()); + } + case 225: + break; + case 37: { + yybegin(XML); + string.append(yytext()); + } + case 226: + break; + case 116: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DEFAULT, yytext()); + } + case 227: + break; + case 32: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ATTRIBUTE, yytext()); + } + case 228: + break; + case 16: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_OPEN, yytext()); + } + case 229: + break; + case 44: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_RIGHT, yytext()); + } + case 230: + break; + case 103: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CLASS, yytext()); + } + case 231: + break; + case 73: { + string.append('\f'); + } + case 232: + break; + case 90: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_USHIFT_RIGHT, yytext()); + } + case 233: + break; + case 39: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MULTIPLY, yytext()); + } + case 234: + break; + case 80: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, new Long(Long.parseLong(yytext().substring(2), 16))); + } + case 235: + break; + case 95: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRUE, yytext()); + } + case 236: + break; + case 23: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COMMA, yytext()); + } + case 237: + break; + case 74: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.REST, yytext()); + } + case 238: + break; + case 61: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INCREMENT, yytext()); + } + case 239: + break; + case 47: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, new Long(Long.parseLong(yytext(), 8))); + } + case 240: + break; + case 33: { + string.append(yytext()); + } + case 241: + break; + case 12: { + string.setLength(0); + yybegin(STRING); + } + case 242: + break; + case 100: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.BREAK, yytext()); + } + case 243: + break; + case 57: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AND, yytext()); + } + case 244: + break; + case 7: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COLON, yytext()); + } + case 245: + break; + case 125: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.NAMESPACE, yytext()); + } + case 246: + break; + case 121: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONTINUE, yytext()); + } + case 247: + break; + case 6: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, yytext()); + } + case 248: + break; + case 118: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FINALLY, yytext()); + } + case 249: + break; + case 89: { + String t = yytext(); + return new ParsedSymbol(SymbolGroup.TYPENAME, SymbolType.TYPENAME, t.substring(2, t.length() - 1)); + } + case 250: + break; + case 24: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT, yytext()); + } + case 251: + break; + case 25: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEGATE, yytext()); + } + case 252: + break; + case 45: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_EQUAL, yytext()); + } + case 253: + break; + case 48: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MINUS, yytext()); + } + case 254: + break; + case 55: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT_EQUAL, yytext()); + } + case 255: + break; + case 36: { + string.append(yytext()); + yyline++; + } + case 256: + break; + case 96: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THIS, yytext()); + } + case 257: + break; + case 1: { + } + case 258: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(SymbolGroup.EOF, SymbolType.EOF, null); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } } 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 519ce515d..41236029b 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 @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash.action.parser.script; import com.jpexs.decompiler.flash.SWF; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.parser.ParseException; import static com.jpexs.decompiler.flash.action.parser.script.SymbolType.ASSIGN; @@ -48,16 +47,14 @@ 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.action.treemodel.ReturnTreeItem; -import com.jpexs.decompiler.flash.action.treemodel.StoreRegisterTreeItem; +import com.jpexs.decompiler.flash.action.treemodel.ConstantPool; +import com.jpexs.decompiler.flash.graph.GraphSourceItem; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; -import java.util.AbstractList; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.TreeSet; import java.util.logging.Level; @@ -69,36 +66,40 @@ import java.util.logging.Logger; */ public class ActionScriptParser { - public static final int REGISTER_PARENT = 1; - public static final int REGISTER_ROOT = 2; + public static final int REGISTER_PARENT = 5; + public static final int REGISTER_ROOT = 4; public static final int REGISTER_SUPER = 3; - public static final int REGISTER_ARGUMENTS = 4; - public static final int REGISTER_THIS = 5; + public static final int REGISTER_ARGUMENTS = 2; + public static final int REGISTER_THIS = 1; public static final int REGISTER_GLOBAL = 6; - private static long uniqLast = 0; + private long uniqLast = 0; + private boolean debugMode = false; - private static String uniqId() { + private String uniqId() { uniqLast++; return "" + uniqLast; } - private static List commands(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod, int forinlevel) throws IOException, ParseException { + private List commands(HashMap registerVars, boolean inFunction, boolean inMethod, int forinlevel) throws IOException, ParseException { List ret = new ArrayList(); - System.out.println("commands:"); + if (debugMode) { + System.out.println("commands:"); + } List cmd = new ArrayList(); - while ((cmd = command(lexer, registerVars, inFunction, inMethod, forinlevel)) != null) { + while ((cmd = command(registerVars, inFunction, inMethod, forinlevel)) != null) { ret.addAll(cmd); } - - System.out.println("/commands"); + if (debugMode) { + System.out.println("/commands"); + } return ret; } - private static void fixLoop(List code, int breakOffset) { + private void fixLoop(List code, int breakOffset) { fixLoop(code, breakOffset, Integer.MAX_VALUE); } - private static Object fixZero(Object o) { + private Object fixZero(Object o) { if (o instanceof Long) { if (o.equals(new Long(0))) { return new Double(0); @@ -107,7 +108,7 @@ public class ActionScriptParser { return o; } - private static void fixLoop(List code, int breakOffset, int continueOffset) { + private void fixLoop(List code, int breakOffset, int continueOffset) { int pos = 0; for (Action a : code) { pos += a.getBytes(SWF.DEFAULT_VERSION).length; @@ -125,19 +126,19 @@ public class ActionScriptParser { } } - private static List nonempty(List list) { + private List nonempty(List list) { if (list == null) { return new ArrayList(); } return list; } - private static List typeToActions(List type, List value) throws IOException, ParseException { + private List typeToActions(List type, List value) throws IOException, ParseException { List ret = new ArrayList(); if (type.isEmpty()) { return ret; } - ret.add(new ActionPush(type.get(0))); + ret.add(pushConst(type.get(0))); if (type.size() == 1 && (value != null)) { ret.addAll(value); ret.add(new ActionSetVariable()); @@ -145,7 +146,7 @@ public class ActionScriptParser { ret.add(new ActionGetVariable()); } for (int i = 1; i < type.size(); i++) { - ret.add(new ActionPush(type.get(i))); + ret.add(pushConst(type.get(i))); if ((i == type.size() - 1) && (value != null)) { ret.addAll(value); ret.add(new ActionSetMember()); @@ -156,59 +157,59 @@ public class ActionScriptParser { return ret; } - private static List type(ActionScriptLexer lexer) throws IOException, ParseException { + private List type() throws IOException, ParseException { List ret = new ArrayList(); - ParsedSymbol s = lex(lexer); + ParsedSymbol s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); ret.add(s.value.toString()); - s = lex(lexer); + s = lex(); while (s.type == SymbolType.DOT) { - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); ret.add(s.value.toString()); - s = lex(lexer); + s = lex(); } lexer.pushback(s); return ret; } - private static List variable(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod) throws IOException, ParseException { + private List variable(HashMap registerVars, boolean inFunction, boolean inMethod) throws IOException, ParseException { List ret = new ArrayList(); - ParsedSymbol s = lex(lexer); + ParsedSymbol s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.THIS, SymbolType.SUPER); if (registerVars.containsKey(s.value.toString())) { ret.add(new ActionPush(new RegisterNumber(registerVars.get(s.value.toString())))); } else { if (inMethod) { ret.add(new ActionPush(new RegisterNumber(REGISTER_THIS))); - ret.add(new ActionPush(s.value)); + ret.add(pushConst(s.value.toString())); ret.add(new ActionGetMember()); } else { - ret.add(new ActionPush(s.value)); + ret.add(s.value.toString().equals("trace") ? new ActionPush(s.value.toString()) : pushConst(s.value.toString())); ret.add(new ActionGetVariable()); } } - s = lex(lexer); + s = lex(); while (s.isType(SymbolType.DOT, SymbolType.BRACKET_OPEN)) { if (s.type == SymbolType.BRACKET_OPEN) { - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - expected(lexer, SymbolType.BRACKET_CLOSE); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); + expected(SymbolType.BRACKET_CLOSE); ret.add(new ActionGetMember()); - s = lex(lexer); + s = lex(); continue; } - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.THIS, SymbolType.SUPER); - ret.add(new ActionPush(s.value)); + ret.add(pushConst(s.value.toString())); ret.add(new ActionGetMember()); - s = lex(lexer); + s = lex(); } lexer.pushback(s); return ret; } - private static void expected(ParsedSymbol symb, int line, SymbolType... expected) throws IOException, ParseException { + private void expected(ParsedSymbol symb, int line, SymbolType... expected) throws IOException, ParseException { boolean found = false; for (SymbolType t : expected) { if (symb.type == t) { @@ -229,54 +230,56 @@ public class ActionScriptParser { } } - private static ParsedSymbol expected(ActionScriptLexer lexer, SymbolType... type) throws IOException, ParseException { - ParsedSymbol symb = lex(lexer); + private ParsedSymbol expected(SymbolType... type) throws IOException, ParseException { + ParsedSymbol symb = lex(); expected(symb, lexer.yyline(), type); return symb; } - private static ParsedSymbol lex(ActionScriptLexer lexer) throws IOException, ParseException { + private ParsedSymbol lex() throws IOException, ParseException { ParsedSymbol ret = lexer.lex(); - System.out.println(ret); + if (debugMode) { + System.out.println(ret); + } return ret; } - private static List call(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod) throws IOException, ParseException { + private List call(HashMap registerVars, boolean inFunction, boolean inMethod) throws IOException, ParseException { List ret = new ArrayList(); - //expected(lexer, SymbolType.PARENT_OPEN); //MUST BE HANDLED BY CALLER + //expected(SymbolType.PARENT_OPEN); //MUST BE HANDLED BY CALLER int cnt = 0; - ParsedSymbol s = lex(lexer); + ParsedSymbol s = lex(); while (s.type != SymbolType.PARENT_CLOSE) { if (s.type != SymbolType.COMMA) { lexer.pushback(s); } cnt++; - ret.addAll(0, expression(lexer, registerVars, inFunction, inMethod, true)); - s = lex(lexer); + ret.addAll(0, expression(registerVars, inFunction, inMethod, true)); + s = lex(); expected(s, lexer.yyline(), SymbolType.COMMA, SymbolType.PARENT_CLOSE); } ret.add(new ActionPush(fixZero(new Long(cnt)))); return ret; } - private static List function(ActionScriptLexer lexer, boolean withBody, String functionName, boolean isMethod) throws IOException, ParseException { + private List function(boolean withBody, String functionName, boolean isMethod) throws IOException, ParseException { List ret = new ArrayList(); ParsedSymbol s = null; - expected(lexer, SymbolType.PARENT_OPEN); - s = lex(lexer); + expected(SymbolType.PARENT_OPEN); + s = lex(); List paramNames = new ArrayList(); while (s.type != SymbolType.PARENT_CLOSE) { if (s.type != SymbolType.COMMA) { lexer.pushback(s); } - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); paramNames.add(s.value.toString()); - s = lex(lexer); + s = lex(); if (s.type == SymbolType.COLON) { - type(lexer); - s = lex(lexer); + type(); + s = lex(); } if (!s.isType(SymbolType.COMMA, SymbolType.PARENT_CLOSE)) { @@ -309,8 +312,8 @@ public class ActionScriptParser { TreeSet usedRegisters = new TreeSet(); if (withBody) { - expected(lexer, SymbolType.CURLY_OPEN); - List body = commands(lexer, registerVars, true, isMethod, 0); + expected(SymbolType.CURLY_OPEN); + List body = commands(registerVars, true, isMethod, 0); for (Action a : body) { if (a instanceof ActionStoreRegister) { usedRegisters.add(((ActionStoreRegister) a).registerNumber); @@ -392,12 +395,16 @@ public class ActionScriptParser { } } - TreeSet usedRegisters2=new TreeSet(); - for(int i:usedRegisters){ - usedRegisters2.add(registerMap.get(i)); + TreeSet usedRegisters2 = new TreeSet(); + for (int i : usedRegisters) { + if (registerMap.get(i) == null) { + usedRegisters2.add(i); + } else { + usedRegisters2.add(registerMap.get(i)); + } } - usedRegisters=usedRegisters2; - + usedRegisters = usedRegisters2; + for (Action a : body) { if (a instanceof ActionStoreRegister) { if (registerMap.containsKey(((ActionStoreRegister) a).registerNumber)) { @@ -415,7 +422,7 @@ public class ActionScriptParser { } } } - expected(lexer, SymbolType.CURLY_CLOSE); + expected(SymbolType.CURLY_CLOSE); ret.addAll(body); } else { for (int i = 0; i < paramNames.size(); i++) { @@ -450,7 +457,7 @@ public class ActionScriptParser { return ret; } - private static List gettoset(List get, List value) { + private List gettoset(List get, List value) { List ret = new ArrayList(); ret.addAll(get); if (!ret.isEmpty()) { @@ -473,7 +480,7 @@ public class ActionScriptParser { return ret; } - private static List traits(ActionScriptLexer lexer, boolean isInterface, List nameStr, List extendsStr, List> implementsStr) throws IOException, ParseException { + private List traits(boolean isInterface, List nameStr, List extendsStr, List> implementsStr) throws IOException, ParseException { List ret = new ArrayList(); for (int i = 0; i < nameStr.size() - 1; i++) { @@ -486,7 +493,7 @@ public class ActionScriptParser { List val = new ArrayList(); val.add(new ActionPush((Long) 0L)); - val.add(new ActionPush("Object")); + val.add(pushConst("Object")); val.add(new ActionNewObject()); notBody.addAll(typeToActions(globalClassTypeStr, val)); ret.addAll(typeToActions(globalClassTypeStr, null)); @@ -505,47 +512,47 @@ public class ActionScriptParser { List constr = new ArrayList(); looptrait: while (true) { - s = lex(lexer); + s = lex(); boolean isStatic = false; while (s.isType(SymbolType.STATIC, SymbolType.PUBLIC, SymbolType.PRIVATE)) { if (s.type == SymbolType.STATIC) { isStatic = true; } - s = lex(lexer); + s = lex(); } switch (s.type) { case FUNCTION: - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); String fname = s.value.toString(); if (fname.equals(nameStr.get(nameStr.size() - 1))) { //constructor constr = new ArrayList(); - constr.addAll(function(lexer, !isInterface, "", true)); + constr.addAll(function(!isInterface, "", true)); constr.add(new ActionStoreRegister(1)); constr = (typeToActions(globalClassTypeStr, constr)); } else { ifbody.add(new ActionPush(new RegisterNumber(isStatic ? 1 : 2))); - ifbody.add(new ActionPush(fname)); - ifbody.addAll(function(lexer, !isInterface, "", true)); + ifbody.add(pushConst(fname)); + ifbody.addAll(function(!isInterface, "", true)); ifbody.add(new ActionSetMember()); } break; case VAR: - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); String ident = s.value.toString(); - s = lex(lexer); + s = lex(); if (s.type == SymbolType.COLON) { - type(lexer); - s = lex(lexer); + type(); + s = lex(); } if (s.type == SymbolType.ASSIGN) { ifbody.add(new ActionPush(new RegisterNumber(isStatic ? 1 : 2))); - ifbody.add(new ActionPush(ident)); - ifbody.addAll(expression(lexer, new HashMap(), false, false, true)); + ifbody.add(pushConst(ident)); + ifbody.addAll(expression(new HashMap(), false, false, true)); ifbody.add(new ActionSetMember()); - s = lex(lexer); + s = lex(); } if (s.type != SymbolType.SEMICOLON) { lexer.pushback(s); @@ -562,10 +569,10 @@ public class ActionScriptParser { ifbody.add(new ActionPush((Long) 1L)); ifbody.add(new ActionPush(new Null())); ifbody.addAll(typeToActions(globalClassTypeStr, null)); - ifbody.add(new ActionPush("prototype")); + ifbody.add(pushConst("prototype")); ifbody.add(new ActionGetMember()); ifbody.add(new ActionPush((Long) 3L)); - ifbody.add(new ActionPush("ASSetPropFlags")); + ifbody.add(pushConst("ASSetPropFlags")); ifbody.add(new ActionCallFunction()); } @@ -581,7 +588,7 @@ public class ActionScriptParser { constr.add(new ActionExtends()); } constr.add(new ActionPush(new RegisterNumber(1))); - constr.add(new ActionPush("prototype")); + constr.add(pushConst("prototype")); constr.add(new ActionGetMember()); constr.add(new ActionStoreRegister(2)); constr.add(new ActionPop()); @@ -605,86 +612,88 @@ public class ActionScriptParser { return ret; } - private static List command(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod, int forinlevel) throws IOException, ParseException { + private List command(HashMap registerVars, boolean inFunction, boolean inMethod, int forinlevel) throws IOException, ParseException { List ret = new ArrayList(); - System.out.println("command:"); - ParsedSymbol s = lex(lexer); + if (debugMode) { + System.out.println("command:"); + } + ParsedSymbol s = lex(); if (s.type == SymbolType.EOF) { return null; } switch (s.type) { case CLASS: - List classTypeStr = type(lexer); - s = lex(lexer); + List classTypeStr = type(); + s = lex(); List extendsTypeStr = new ArrayList(); if (s.type == SymbolType.EXTENDS) { - extendsTypeStr = type(lexer); - s = lex(lexer); + extendsTypeStr = type(); + s = lex(); } List> implementsTypeStrs = new ArrayList>(); if (s.type == SymbolType.IMPLEMENTS) { do { - List implementsTypeStr = type(lexer); + List implementsTypeStr = type(); implementsTypeStrs.add(implementsTypeStr); - s = lex(lexer); + s = lex(); } while (s.type == SymbolType.COMMA); } expected(s, lexer.yyline(), SymbolType.CURLY_OPEN); - ret.addAll(traits(lexer, false, classTypeStr, extendsTypeStr, implementsTypeStrs)); - expected(lexer, SymbolType.CURLY_CLOSE); + ret.addAll(traits(false, classTypeStr, extendsTypeStr, implementsTypeStrs)); + expected(SymbolType.CURLY_CLOSE); break; case INTERFACE: - List interfaceTypeStr = type(lexer); - s = lex(lexer); + List interfaceTypeStr = type(); + s = lex(); List> intExtendsTypeStrs = new ArrayList>(); if (s.type == SymbolType.EXTENDS) { do { - List intExtendsTypeStr = type(lexer); + List intExtendsTypeStr = type(); intExtendsTypeStrs.add(intExtendsTypeStr); - s = lex(lexer); + s = lex(); } while (s.type == SymbolType.COMMA); } expected(s, lexer.yyline(), SymbolType.CURLY_OPEN); - ret.addAll(traits(lexer, true, interfaceTypeStr, new ArrayList(), intExtendsTypeStrs)); - expected(lexer, SymbolType.CURLY_CLOSE); + ret.addAll(traits(true, interfaceTypeStr, new ArrayList(), intExtendsTypeStrs)); + expected(SymbolType.CURLY_CLOSE); break; case FUNCTION: s = lexer.lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); - ret.addAll(function(lexer, true, s.value.toString(), false)); + ret.addAll(function(true, s.value.toString(), false)); break; case NEW: List newcmds = new ArrayList(); - newcmds.addAll(typeToActions(type(lexer), null)); - expected(lexer, SymbolType.PARENT_OPEN); + newcmds.addAll(typeToActions(type(), null)); + expected(SymbolType.PARENT_OPEN); if (newcmds.get(newcmds.size() - 1) instanceof ActionGetMember) { newcmds.remove(newcmds.size() - 1); - newcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + newcmds.addAll(0, call(registerVars, inFunction, inMethod)); newcmds.add(new ActionNewMethod()); } else if (newcmds.get(newcmds.size() - 1) instanceof ActionGetVariable) { newcmds.remove(newcmds.size() - 1); - newcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + newcmds.addAll(0, call(registerVars, inFunction, inMethod)); newcmds.add(new ActionNewObject()); } ret.addAll(newcmds); break; case VAR: - s = lex(lexer); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); String varIdentifier = s.value.toString(); - s = lex(lexer); + s = lex(); if (s.type == SymbolType.COLON) { - type(lexer); - s = lex(lexer); + type(); + s = lex(); //TODO: handle value type } if (s.type == SymbolType.ASSIGN) { if (!inFunction) { - ret.add(new ActionPush(varIdentifier)); + ret.add(pushConst(varIdentifier)); } - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); if (inFunction) { for (int i = 1; i < 256; i++) { if (!registerVars.containsValue(i)) { @@ -706,19 +715,19 @@ public class ActionScriptParser { } } } else { - ret.add(new ActionPush(varIdentifier)); + ret.add(pushConst(varIdentifier)); ret.add(new ActionDefineLocal2()); } lexer.pushback(s); } break; case CURLY_OPEN: - ret.addAll(commands(lexer, registerVars, inFunction, inMethod, forinlevel)); - expected(lexer, SymbolType.CURLY_CLOSE); + ret.addAll(commands(registerVars, inFunction, inMethod, forinlevel)); + expected(SymbolType.CURLY_CLOSE); break; case INCREMENT: case DECREMENT: - List varincdec = variable(lexer, registerVars, inFunction, inMethod); + List varincdec = variable(registerVars, inFunction, inMethod); List incdecval = new ArrayList(); incdecval.addAll(varincdec); if (s.type == SymbolType.INCREMENT) { @@ -733,12 +742,12 @@ public class ActionScriptParser { case THIS: case SUPER: lexer.pushback(s); - List var = variable(lexer, registerVars, inFunction, inMethod); - s = lex(lexer); + List var = variable(registerVars, inFunction, inMethod); + s = lex(); switch (s.type) { case ASSIGN: ret.addAll(var); - ret = gettoset(ret, expression(lexer, registerVars, inFunction, inMethod, true)); + ret = gettoset(ret, expression(registerVars, inFunction, inMethod, true)); break; case ASSIGN_BITAND: case ASSIGN_BITOR: @@ -753,7 +762,7 @@ public class ActionScriptParser { case ASSIGN_XOR: List varset = new ArrayList(); varset.addAll(var); - var.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); + var.addAll(expression(registerVars, inFunction, inMethod, true)); switch (s.type) { case ASSIGN_BITAND: var.add(new ActionBitAnd()); @@ -802,9 +811,14 @@ public class ActionScriptParser { case PARENT_OPEN: //function call List callcmds = new ArrayList(); callcmds.addAll(var); - if (callcmds.get(callcmds.size() - 1) instanceof ActionGetMember) { + if (callcmds.get(callcmds.size() - 1) instanceof ActionPush) { //push register + callcmds.addAll(0, call(registerVars, inFunction, inMethod)); + callcmds.add(new ActionPush(new Undefined())); + callcmds.add(new ActionCallMethod()); + callcmds.add(new ActionPop()); + } else if (callcmds.get(callcmds.size() - 1) instanceof ActionGetMember) { callcmds.remove(callcmds.size() - 1); - callcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + callcmds.addAll(0, call(registerVars, inFunction, inMethod)); callcmds.add(new ActionCallMethod()); callcmds.add(new ActionPop()); } else if (callcmds.get(callcmds.size() - 1) instanceof ActionGetVariable) { @@ -812,11 +826,11 @@ public class ActionScriptParser { ActionPush ap = (ActionPush) callcmds.get(callcmds.size() - 1); if (ap.values.get(0).equals("trace")) { callcmds.remove(callcmds.size() - 1); - callcmds.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - expected(lexer, SymbolType.COMMA, SymbolType.PARENT_CLOSE); + callcmds.addAll(expression(registerVars, inFunction, inMethod, true)); + expected(SymbolType.COMMA, SymbolType.PARENT_CLOSE); callcmds.add(new ActionTrace()); } else { - callcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + callcmds.addAll(0, call(registerVars, inFunction, inMethod)); callcmds.add(new ActionCallFunction()); callcmds.add(new ActionPop()); } @@ -828,14 +842,14 @@ public class ActionScriptParser { } break; case IF: - expected(lexer, SymbolType.PARENT_OPEN); - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - expected(lexer, SymbolType.PARENT_CLOSE); - List onTrue = command(lexer, registerVars, inFunction, inMethod, forinlevel); + expected(SymbolType.PARENT_OPEN); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); + expected(SymbolType.PARENT_CLOSE); + List onTrue = command(registerVars, inFunction, inMethod, forinlevel); List onFalse = null; - s = lex(lexer); + s = lex(); if (s.type == SymbolType.ELSE) { - onFalse = command(lexer, registerVars, inFunction, inMethod, forinlevel); + onFalse = command(registerVars, inFunction, inMethod, forinlevel); } else { lexer.pushback(s); } @@ -866,10 +880,10 @@ public class ActionScriptParser { } break; case WHILE: - expected(lexer, SymbolType.PARENT_OPEN); - List whileExpr = expression(lexer, registerVars, inFunction, inMethod, true); - expected(lexer, SymbolType.PARENT_CLOSE); - List whileBody = command(lexer, registerVars, inFunction, inMethod, forinlevel); + expected(SymbolType.PARENT_OPEN); + List whileExpr = expression(registerVars, inFunction, inMethod, true); + expected(SymbolType.PARENT_CLOSE); + List whileBody = command(registerVars, inFunction, inMethod, forinlevel); whileExpr.add(new ActionNot()); ActionIf whileaif = new ActionIf(0); whileExpr.add(whileaif); @@ -885,12 +899,12 @@ public class ActionScriptParser { ret.addAll(whileBody); break; case DO: - List doBody = command(lexer, registerVars, inFunction, inMethod, forinlevel); - expected(lexer, SymbolType.WHILE); - expected(lexer, SymbolType.PARENT_OPEN); - List doExpr = expression(lexer, registerVars, inFunction, inMethod, true); + List doBody = command(registerVars, inFunction, inMethod, forinlevel); + expected(SymbolType.WHILE); + expected(SymbolType.PARENT_OPEN); + List doExpr = expression(registerVars, inFunction, inMethod, true); - expected(lexer, SymbolType.PARENT_CLOSE); + expected(SymbolType.PARENT_CLOSE); int doBodyLen = Action.actionsToBytes(doBody, false, SWF.DEFAULT_VERSION).length; int doExprLen = Action.actionsToBytes(doExpr, false, SWF.DEFAULT_VERSION).length; @@ -902,14 +916,14 @@ public class ActionScriptParser { fixLoop(doBody, doBodyLen + doExprLen + doif.getBytes(SWF.DEFAULT_VERSION).length, doBodyLen); break; case FOR: - expected(lexer, SymbolType.PARENT_OPEN); - s = lex(lexer); + expected(SymbolType.PARENT_OPEN); + s = lex(); boolean forin = false; List collection = new ArrayList(); String objIdent = null; int innerExprReg = 0; if (s.type == SymbolType.VAR) { - ParsedSymbol s2 = lex(lexer); + ParsedSymbol s2 = lex(); if (s2.type == SymbolType.IDENTIFIER) { objIdent = s2.value.toString(); if (inFunction) { @@ -921,9 +935,9 @@ public class ActionScriptParser { } } } - ParsedSymbol s3 = lex(lexer); + ParsedSymbol s3 = lex(); if (s3.type == SymbolType.IN) { - collection = expression(lexer, registerVars, inFunction, inMethod, true); + collection = expression(registerVars, inFunction, inMethod, true); forin = true; } } else { @@ -936,14 +950,14 @@ public class ActionScriptParser { List forFinalCommands = new ArrayList(); List forExpr = new ArrayList(); if (!forin) { - ret.addAll(nonempty(command(lexer, registerVars, inFunction, inMethod, forinlevel))); - expected(lexer, SymbolType.SEMICOLON); - forExpr = expression(lexer, registerVars, inFunction, inMethod, true); - expected(lexer, SymbolType.SEMICOLON); - forFinalCommands = command(lexer, registerVars, inFunction, inMethod, forinlevel); + ret.addAll(nonempty(command(registerVars, inFunction, inMethod, forinlevel))); + expected(SymbolType.SEMICOLON); + forExpr = expression(registerVars, inFunction, inMethod, true); + expected(SymbolType.SEMICOLON); + forFinalCommands = command(registerVars, inFunction, inMethod, forinlevel); } - expected(lexer, SymbolType.PARENT_CLOSE); - List forBody = command(lexer, registerVars, inFunction, inMethod, forin ? forinlevel + 1 : forinlevel); + expected(SymbolType.PARENT_CLOSE); + List forBody = command(registerVars, inFunction, inMethod, forin ? forinlevel + 1 : forinlevel); if (forin) { ret.addAll(collection); ret.add(new ActionEnumerate2()); @@ -969,7 +983,7 @@ public class ActionScriptParser { loopBody.add(new ActionStoreRegister(innerExprReg)); loopBody.add(new ActionPop()); } else { - loopBody.add(0, new ActionPush(objIdent)); + loopBody.add(0, pushConst(objIdent)); loopBody.add(new ActionSetVariable()); } loopBody.addAll(forBody); @@ -1001,11 +1015,11 @@ public class ActionScriptParser { } break; case SWITCH: - expected(lexer, SymbolType.PARENT_OPEN); - List switchExpr = expression(lexer, registerVars, inFunction, inMethod, true); - expected(lexer, SymbolType.PARENT_CLOSE); - expected(lexer, SymbolType.CURLY_OPEN); - s = lex(lexer); + expected(SymbolType.PARENT_OPEN); + List switchExpr = expression(registerVars, inFunction, inMethod, true); + expected(SymbolType.PARENT_CLOSE); + expected(SymbolType.CURLY_OPEN); + s = lex(); ret.addAll(switchExpr); int exprReg = 0; for (int i = 0; i < 256; i++) { @@ -1023,7 +1037,7 @@ public class ActionScriptParser { List> caseExprs = new ArrayList>(); List caseIfsOne = new ArrayList(); while (s.type == SymbolType.CASE) { - List curCaseExpr = expression(lexer, registerVars, inFunction, inMethod, true); + List curCaseExpr = expression(registerVars, inFunction, inMethod, true); caseExprs.add(curCaseExpr); if (firstCase) { curCaseExpr.add(0, new ActionStoreRegister(exprReg)); @@ -1036,22 +1050,22 @@ public class ActionScriptParser { curCaseExpr.add(aif); ret.addAll(curCaseExpr); firstCase = false; - expected(lexer, SymbolType.COLON); - s = lex(lexer); + expected(SymbolType.COLON); + s = lex(); } caseExprsAll.add(caseExprs); caseIfs.add(caseIfsOne); lexer.pushback(s); - List caseCmd = commands(lexer, registerVars, inFunction, inMethod, forinlevel); + List caseCmd = commands(registerVars, inFunction, inMethod, forinlevel); caseCmds.add(caseCmd); - s = lex(lexer); + s = lex(); } ActionJump defJump = new ActionJump(0); ret.add(defJump); List defCmd = new ArrayList(); if (s.type == SymbolType.DEFAULT) { - expected(lexer, SymbolType.COLON); - defCmd = commands(lexer, registerVars, inFunction, inMethod, forinlevel); + expected(SymbolType.COLON); + defCmd = commands(registerVars, inFunction, inMethod, forinlevel); s = lexer.lex(); } for (List caseCmd : caseCmds) { @@ -1129,7 +1143,7 @@ public class ActionScriptParser { aforinif.setJumpOffset(-Action.actionsToBytes(forinret, false, SWF.DEFAULT_VERSION).length); ret.addAll(forinret); } - List retexpr = expression(lexer, true, registerVars, inFunction, inMethod, true); + List retexpr = expression(true, registerVars, inFunction, inMethod, true); ret.addAll(retexpr); if (retexpr.isEmpty()) { ret.add(new ActionPush(new Undefined())); @@ -1137,20 +1151,20 @@ public class ActionScriptParser { ret.add(new ActionReturn()); break; case TRY: - List tryCommands = command(lexer, registerVars, inFunction, inMethod, forinlevel); - s = lex(lexer); + List tryCommands = command(registerVars, inFunction, inMethod, forinlevel); + s = lex(); boolean found = false; List catchCommands = null; String catchName = null; int catchSize = 0; if (s.type == SymbolType.CATCH) { - expected(lexer, SymbolType.PARENT_OPEN); - s = lex(lexer); + expected(SymbolType.PARENT_OPEN); + s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER); catchName = s.value.toString(); - expected(lexer, SymbolType.PARENT_CLOSE); - catchCommands = command(lexer, registerVars, inFunction, inMethod, forinlevel); - s = lex(lexer); + expected(SymbolType.PARENT_CLOSE); + catchCommands = command(registerVars, inFunction, inMethod, forinlevel); + s = lex(); found = true; catchSize = Action.actionsToBytes(catchCommands, false, SWF.DEFAULT_VERSION).length; tryCommands.add(new ActionJump(catchSize)); @@ -1158,9 +1172,9 @@ public class ActionScriptParser { List finallyCommands = null; int finallySize = 0; if (s.type == SymbolType.FINALLY) { - finallyCommands = command(lexer, registerVars, inFunction, inMethod, forinlevel); + finallyCommands = command(registerVars, inFunction, inMethod, forinlevel); found = true; - s = lex(lexer); + s = lex(); finallySize = Action.actionsToBytes(finallyCommands, false, SWF.DEFAULT_VERSION).length; } if (!found) { @@ -1179,39 +1193,43 @@ public class ActionScriptParser { } break; case THROW: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); ret.add(new ActionThrow()); break; default: lexer.pushback(s); - System.out.println("/command"); + if (debugMode) { + System.out.println("/command"); + } return null; } - s = lex(lexer); + s = lex(); if ((s != null) && (s.type != SymbolType.SEMICOLON)) { lexer.pushback(s); } - System.out.println("/command"); + if (debugMode) { + System.out.println("/command"); + } return ret; } - private static List expression(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { - return expression(lexer, false, registerVars, inFunction, inMethod, allowRemainder); + private List expression(HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { + return expression(false, registerVars, inFunction, inMethod, allowRemainder); } - private static List expressionRemainder(ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { - return expressionRemainder(new ArrayList(), lexer, registerVars, inFunction, inMethod, allowRemainder); + private List expressionRemainder(HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { + return expressionRemainder(new ArrayList(), registerVars, inFunction, inMethod, allowRemainder); } - private static List expressionRemainder(List expr, ActionScriptLexer lexer, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { + private List expressionRemainder(List expr, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { List ret = new ArrayList(); - ParsedSymbol s = lex(lexer); + ParsedSymbol s = lex(); switch (s.type) { case TERNAR: - List terOnTrue = expression(lexer, registerVars, inFunction, inMethod, true); - expected(lexer, SymbolType.COLON); - List terOnFalse = expression(lexer, registerVars, inFunction, inMethod, true); + List terOnTrue = expression(registerVars, inFunction, inMethod, true); + expected(SymbolType.COLON); + List terOnFalse = expression(registerVars, inFunction, inMethod, true); ret.add(new ActionNot()); ActionIf ifter = new ActionIf(0); ret.add(ifter); @@ -1225,57 +1243,57 @@ public class ActionScriptParser { ret.addAll(terOnFalse); break; case BITAND: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionBitAnd()); break; case BITOR: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionBitOr()); break; case DIVIDE: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionDivide()); break; case EQUALS: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionEquals2()); break; case STRICT_EQUALS: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionStrictEquals()); break; case NOT_EQUAL: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionEquals2()); ret.add(new ActionNot()); break; case STRICT_NOT_EQUAL: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionStrictEquals()); ret.add(new ActionNot()); break; case LOWER_THAN: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionLess2()); break; case LOWER_EQUAL: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionGreater()); ret.add(new ActionNot()); break; case GREATER_THAN: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionGreater()); break; case GREATER_EQUAL: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionLess2()); ret.add(new ActionNot()); break; case AND: ret.add(new ActionPushDuplicate()); ret.add(new ActionNot()); - List andExpr = expression(lexer, registerVars, inFunction, inMethod, true); + List andExpr = expression(registerVars, inFunction, inMethod, true); andExpr.add(0, new ActionPop()); int andExprLen = Action.actionsToBytes(andExpr, false, SWF.DEFAULT_VERSION).length; ret.add(new ActionIf(andExprLen)); @@ -1283,14 +1301,14 @@ public class ActionScriptParser { break; case OR: ret.add(new ActionPushDuplicate()); - List orExpr = expression(lexer, registerVars, inFunction, inMethod, true); + List orExpr = expression(registerVars, inFunction, inMethod, true); orExpr.add(0, new ActionPop()); int orExprLen = Action.actionsToBytes(orExpr, false, SWF.DEFAULT_VERSION).length; ret.add(new ActionIf(orExprLen)); ret.addAll(orExpr); break; case MINUS: - List minusExp = expression(lexer, registerVars, inFunction, inMethod, allowRemainder); + List minusExp = expression(registerVars, inFunction, inMethod, allowRemainder); if ((minusExp.size() == 1) && (minusExp.get(0) instanceof ActionPush) && (((ActionPush) minusExp.get(0)).values.get(0).equals(new Long(1)))) { ret.add(new ActionDecrement()); } else { @@ -1299,11 +1317,11 @@ public class ActionScriptParser { } break; case MULTIPLY: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionMultiply()); break; case PLUS: - List plusExp = expression(lexer, registerVars, inFunction, inMethod, allowRemainder); + List plusExp = expression(registerVars, inFunction, inMethod, allowRemainder); if ((plusExp.size() == 1) && (plusExp.get(0) instanceof ActionPush) && (((ActionPush) plusExp.get(0)).values.get(0).equals(new Long(1)))) { ret.add(new ActionIncrement()); } else { @@ -1312,21 +1330,21 @@ public class ActionScriptParser { } break; case XOR: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionBitXor()); break; case AS: break; case INSTANCEOF: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionInstanceOf()); break; case IS: break; case TYPEOF: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, allowRemainder)); + ret.addAll(expression(registerVars, inFunction, inMethod, allowRemainder)); ret.add(new ActionTypeOf()); break; default: @@ -1335,24 +1353,24 @@ public class ActionScriptParser { return ret; } - private static List expression(ActionScriptLexer lexer, boolean allowEmpty, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { + private List expression(boolean allowEmpty, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder) throws IOException, ParseException { List ret = new ArrayList(); - ParsedSymbol s = lex(lexer); + ParsedSymbol s = lex(); boolean existsRemainder = false; boolean assocRight = false; switch (s.type) { case CURLY_OPEN: //Object literal - s = lex(lexer); + s = lex(); int objCnt = 0; while (s.type != SymbolType.CURLY_CLOSE) { if (s.type != SymbolType.COMMA) { lexer.pushback(s); } objCnt++; - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - expected(lexer, SymbolType.COLON); - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - s = lex(lexer); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); + expected(SymbolType.COLON); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); + s = lex(); if (!s.isType(SymbolType.COMMA, SymbolType.CURLY_CLOSE)) { expected(s, lexer.yyline(), SymbolType.COMMA, SymbolType.CURLY_CLOSE); } @@ -1361,15 +1379,15 @@ public class ActionScriptParser { ret.add(new ActionInitObject()); break; case BRACKET_OPEN: //Array literal - s = lex(lexer); + s = lex(); int arrCnt = 0; while (s.type != SymbolType.BRACKET_CLOSE) { if (s.type != SymbolType.COMMA) { lexer.pushback(s); } arrCnt++; - expression(lexer, registerVars, inFunction, inMethod, true); - s = lex(lexer); + expression(registerVars, inFunction, inMethod, true); + s = lex(); if (!s.isType(SymbolType.COMMA, SymbolType.BRACKET_CLOSE)) { expected(s, lexer.yyline(), SymbolType.COMMA, SymbolType.BRACKET_CLOSE); } @@ -1386,22 +1404,26 @@ public class ActionScriptParser { } else { lexer.pushback(s); } - ret.addAll(function(lexer, true, fname, false)); + ret.addAll(function(true, fname, false)); + break; + case STRING: + ret.add(pushConst(s.value.toString())); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); + existsRemainder = true; break; case INTEGER: - case STRING: case DOUBLE: ret.add(new ActionPush(fixZero(s.value))); - //ret.addAll(expressionRemainder(lexer, registerVars, inFunction, inMethod)); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); existsRemainder = true; break; case DELETE: - ret.addAll(variable(lexer, registerVars, inFunction, inMethod)); + ret.addAll(variable(registerVars, inFunction, inMethod)); ret.add(new ActionDelete()); break; case INCREMENT: case DECREMENT: //preincrement - List prevar = variable(lexer, registerVars, inFunction, inMethod); + List prevar = variable(registerVars, inFunction, inMethod); ret.addAll(prevar); Action prelast = ret.remove(ret.size() - 1); ret.addAll(prevar); @@ -1426,32 +1448,32 @@ public class ActionScriptParser { ret.add(new ActionSetMember()); } ret.add(new ActionPush(new RegisterNumber(tmpReg))); - //ret.addAll(expressionRemainder(lexer, registerVars, inFunction, inMethod)); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); existsRemainder = true; break; case NOT: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); ret.add(new ActionNot()); - //ret.addAll(expressionRemainder(lexer, registerVars, inFunction, inMethod)); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); existsRemainder = true; break; case PARENT_OPEN: - ret.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); - expected(lexer, SymbolType.PARENT_CLOSE); - //ret.addAll(expressionRemainder(lexer, registerVars, inFunction, inMethod)); + ret.addAll(expression(registerVars, inFunction, inMethod, true)); + expected(SymbolType.PARENT_CLOSE); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); existsRemainder = true; break; case NEW: List newcmds = new ArrayList(); - newcmds.addAll(variable(lexer, registerVars, inFunction, inMethod)); - expected(lexer, SymbolType.PARENT_OPEN); + newcmds.addAll(variable(registerVars, inFunction, inMethod)); + expected(SymbolType.PARENT_OPEN); if (newcmds.get(newcmds.size() - 1) instanceof ActionGetMember) { newcmds.remove(newcmds.size() - 1); - newcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + newcmds.addAll(0, call(registerVars, inFunction, inMethod)); newcmds.add(new ActionNewMethod()); } else if (newcmds.get(newcmds.size() - 1) instanceof ActionGetVariable) { newcmds.remove(newcmds.size() - 1); - newcmds.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + newcmds.addAll(0, call(registerVars, inFunction, inMethod)); newcmds.add(new ActionNewObject()); } ret.addAll(newcmds); @@ -1460,9 +1482,9 @@ public class ActionScriptParser { case IDENTIFIER: case THIS: lexer.pushback(s); - List var = variable(lexer, registerVars, inFunction, inMethod); + List var = variable(registerVars, inFunction, inMethod); - s = lex(lexer); + s = lex(); switch (s.type) { case ASSIGN: int asTmpReg = 0; @@ -1472,7 +1494,7 @@ public class ActionScriptParser { break; } } - List varval = expression(lexer, registerVars, inFunction, inMethod, true); + List varval = expression(registerVars, inFunction, inMethod, true); varval.add(new ActionStoreRegister(asTmpReg)); var = gettoset(var, varval); ret.addAll(var); @@ -1490,7 +1512,7 @@ public class ActionScriptParser { case ASSIGN_XOR: List varset = new ArrayList(); varset.addAll(var); - var.addAll(expression(lexer, registerVars, inFunction, inMethod, true)); + var.addAll(expression(registerVars, inFunction, inMethod, true)); switch (s.type) { case ASSIGN_BITAND: var.add(new ActionBitAnd()); @@ -1550,11 +1572,11 @@ public class ActionScriptParser { case PARENT_OPEN: //function call if (var.get(var.size() - 1) instanceof ActionGetMember) { var.remove(var.size() - 1); - var.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + var.addAll(0, call(registerVars, inFunction, inMethod)); var.add(new ActionCallMethod()); } else if (var.get(var.size() - 1) instanceof ActionGetVariable) { var.remove(var.size() - 1); - var.addAll(0, call(lexer, registerVars, inFunction, inMethod)); + var.addAll(0, call(registerVars, inFunction, inMethod)); var.add(new ActionCallFunction()); } ret.addAll(var); @@ -1563,7 +1585,7 @@ public class ActionScriptParser { ret.addAll(var); lexer.pushback(s); existsRemainder = true; - //ret.addAll(expressionRemainder(lexer, registerVars, inFunction, inMethod)); + //ret.addAll(expressionRemainder(registerVars, inFunction, inMethod)); } break; default: @@ -1572,16 +1594,27 @@ public class ActionScriptParser { List rem = new ArrayList(); if (allowRemainder && existsRemainder) { do { - rem = expressionRemainder(lexer, registerVars, inFunction, inMethod, assocRight); + rem = expressionRemainder(registerVars, inFunction, inMethod, assocRight); ret.addAll(rem); } while ((!assocRight) && (!rem.isEmpty())); } return ret; } - public static List parse(String str) throws ParseException, IOException { + private ActionPush pushConst(String s) throws IOException, ParseException { + int index = constantPool.indexOf(s); + if (index == -1) { + constantPool.add(s); + index = constantPool.indexOf(s); + } + return new ActionPush(new ConstantIndex(index)); + } + private ActionScriptLexer lexer = null; + private List constantPool; + + public List parse(String str) throws ParseException, IOException { List ret = new ArrayList(); - ActionScriptLexer lexer = null; + try { lexer = new ActionScriptLexer(new InputStreamReader(new ByteArrayInputStream(str.getBytes("UTF8")), "UTF8")); } catch (UnsupportedEncodingException ex) { @@ -1589,12 +1622,19 @@ public class ActionScriptParser { return ret; } - - ret.addAll(commands(lexer, new HashMap(), false, false, 0)); - + constantPool = new ArrayList(); + ret.addAll(commands(new HashMap(), false, false, 0)); + if (!constantPool.isEmpty()) { + ret.add(0, new ActionConstantPool(constantPool)); + } if (lexer.lex().type != SymbolType.EOF) { throw new ParseException("Parsing finisned before end of the file", lexer.yyline()); } + List retgs = new ArrayList(); + retgs.addAll(ret); + if (!constantPool.isEmpty()) { + Action.setConstantPool(retgs, new ConstantPool(constantPool)); + } Action.setActionsAddresses(ret, 0, SWF.DEFAULT_VERSION); return ret; } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java index f324dc02e..a2900d3d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionJump.java @@ -36,8 +36,8 @@ public class ActionJump extends Action { private int offset; public String identifier; - public boolean isContinue=false; - public boolean isBreak=false; + public boolean isContinue = false; + public boolean isBreak = false; public int getJumpOffset() { return offset; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java index fc4ff2a0d..4aca29fc2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf4/ActionPush.java @@ -211,7 +211,7 @@ public class ActionPush extends Action { values = oldVal; return ts; } - + public String paramsToStringReplaced(List container, List knownAddreses, List constantPool, int version, boolean hex) { if (replacement == null || replacement.size() < values.size()) { return paramsToString(); @@ -253,8 +253,8 @@ public class ActionPush extends Action { return ret; } - public String paramsToString(){ - String ret=""; + public String paramsToString() { + String ret = ""; int pos = 0; for (int i = 0; i < values.size(); i++) { if (ignoredParts.contains(i)) { @@ -268,9 +268,10 @@ public class ActionPush extends Action { } return ret; } + @Override public String toString() { - return "Push "+paramsToString(); + return "Push " + paramsToString(); } @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java index b5188bf68..30e523d3f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionConstantPool.java @@ -35,6 +35,11 @@ public class ActionConstantPool extends Action { public List constantPool = new ArrayList(); + public ActionConstantPool(List constantPool) { + super(0x88, 0); + this.constantPool = constantPool; + } + public ActionConstantPool(int actionLength, SWFInputStream sis, int version) throws IOException { super(0x88, actionLength); //sis = new SWFInputStream(new ByteArrayInputStream(sis.readBytes(actionLength)), version); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java index 9c56a840c..6eecaeda7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionStoreRegister.java @@ -75,8 +75,8 @@ public class ActionStoreRegister extends Action { rn.name = regNames.get(registerNumber); } item.moreSrc.add(new GraphSourceItemPos(this, 0)); - boolean define=!variables.containsKey("__register" + registerNumber); + boolean define = !variables.containsKey("__register" + registerNumber); variables.put("__register" + registerNumber, item); - output.add(new StoreRegisterTreeItem(this, rn, item,define)); + output.add(new StoreRegisterTreeItem(this, rn, item, define)); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java index b5090d63a..fb3236a47 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java @@ -64,8 +64,6 @@ public class ActionTry extends Action implements GraphSourceItemContainer { this.version = version; } - - public ActionTry(int actionLength, SWFInputStream sis, ReReadableInputStream rri, int version) throws IOException { super(0x8F, actionLength); long startPos = sis.getPos(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/treemodel/StoreRegisterTreeItem.java b/trunk/src/com/jpexs/decompiler/flash/action/treemodel/StoreRegisterTreeItem.java index 0084b58c2..b911defb5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/treemodel/StoreRegisterTreeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/treemodel/StoreRegisterTreeItem.java @@ -25,7 +25,7 @@ public class StoreRegisterTreeItem extends TreeItem implements SetTypeTreeItem { public RegisterNumber register; public GraphTargetItem value; - public boolean define=false; + public boolean define = false; @Override public void setValue(GraphTargetItem value) { @@ -57,7 +57,7 @@ public class StoreRegisterTreeItem extends TreeItem implements SetTypeTreeItem { @Override public String toString(ConstantPool constants) { - return (define?hilight("var "):"")+hilight(register.toString() + "=") + value.toString(constants); + return (define ? hilight("var ") : "") + hilight(register.toString() + "=") + value.toString(constants); } @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index a8059c7da..cff99c66c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -950,7 +950,7 @@ public class Graph { ret.addAll(output); } GraphPart loopBodyStart = null; - if ((reversed == loop)||doWhile) { + if ((reversed == loop) || doWhile) { if (expr instanceof LogicalOpItem) { expr = ((LogicalOpItem) expr).invert(); } else {