You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/04/26 06:29:02 UTC

[10/63] [abbrv] [partial] git commit: [flex-falcon] [refs/heads/develop] - move stuff to where I think Maven wants it

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/Help.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/Help.java b/debugger/src/main/java/flex/tools/debugger/cli/Help.java
new file mode 100644
index 0000000..b6272bf
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/Help.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+public class Help
+{
+    private Help()
+    {
+    }
+
+    public static InputStream getResourceAsStream()
+    {
+		List<String> names = calculateLocalizedFilenames("fdbhelp", ".txt", Locale.getDefault()); //$NON-NLS-1$ //$NON-NLS-2$
+		for (int i=names.size()-1; i>=0; --i) {
+			InputStream stm = Help.class.getResourceAsStream(names.get(i));
+			if (stm != null) {
+				return stm;
+			}
+		}
+		return null;
+    }
+
+    /**
+     * Returns an array of filenames that might match the given baseName and locale.
+     * For example, if baseName is "fdbhelp", the extension is ".txt", and the locale
+     * is "en_US", then the returned array will be (in this order):
+     * 
+     * <ul>
+     *  <li> <code>fdbhelp.txt</code> </li>
+     *  <li> <code>fdbhelp_en.txt</code> </li>
+     * 	<li> <code>fdbhelp_en_US.txt</code> </li>
+     * </ul>
+     */
+    private static List<String> calculateLocalizedFilenames(String baseName, String extensionWithDot, Locale locale) {
+    	List<String> names = new ArrayList<String>();
+        String language = locale.getLanguage();
+        String country = locale.getCountry();
+        String variant = locale.getVariant();
+
+        names.add(baseName + extensionWithDot);
+
+        if (language.length() + country.length() + variant.length() == 0) {
+            //The locale is "", "", "".
+            return names;
+        }
+        final StringBuilder temp = new StringBuilder(baseName);
+        temp.append('_');
+        temp.append(language);
+        if (language.length() > 0) {
+            names.add(temp.toString() + extensionWithDot);
+        }
+
+        if (country.length() + variant.length() == 0) {
+            return names;
+        }
+        temp.append('_');
+        temp.append(country);
+        if (country.length() > 0) {
+            names.add(temp.toString() + extensionWithDot);
+        }
+
+        if (variant.length() == 0) {
+            return names;
+        }
+        temp.append('_');
+        temp.append(variant);
+        names.add(temp.toString() + extensionWithDot);
+
+        return names;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/IntProperties.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/IntProperties.java b/debugger/src/main/java/flex/tools/debugger/cli/IntProperties.java
new file mode 100644
index 0000000..a5b3ee0
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/IntProperties.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import java.util.HashMap;
+import java.util.Set;
+
+public class IntProperties
+{
+	HashMap<String, Integer> m_map = new HashMap<String, Integer>();
+
+	/* getters */
+	public Integer					getInteger(String s)	{ return m_map.get(s); }
+	public int						get(String s)			{ return getInteger(s).intValue(); }
+	public Set<String>				keySet()				{ return m_map.keySet(); }
+	public HashMap<String, Integer>	map()					{ return m_map; }
+
+	/* setters */
+	public void put(String s, int value)		{ m_map.put(s, new Integer(value)); }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/InternalProperty.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/InternalProperty.java b/debugger/src/main/java/flex/tools/debugger/cli/InternalProperty.java
new file mode 100644
index 0000000..b5ce7e7
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/InternalProperty.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import flash.tools.debugger.expression.NoSuchVariableException;
+
+public class InternalProperty
+{
+	String m_key;
+	Object m_value;
+
+	public InternalProperty(String key, Object value)
+	{
+		m_key = key;
+		m_value = value;
+	}
+
+	/* getters */
+	public String getName()		{ return m_key; }
+	@Override
+	public String toString()	{ return (m_value == null) ? "null" : m_value.toString(); } //$NON-NLS-1$
+
+	public String valueOf() throws NoSuchVariableException 
+	{ 
+		if (m_value == null) 
+			throw new NoSuchVariableException(m_key);
+
+		return toString();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/LocationCollection.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/LocationCollection.java b/debugger/src/main/java/flex/tools/debugger/cli/LocationCollection.java
new file mode 100644
index 0000000..37dbeab
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/LocationCollection.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import flash.tools.debugger.Location;
+
+/**
+ * This object is a container for source locations
+ * that represent the same underlying file and line
+ * number. 
+ *
+ * The reason we need this is because multiple 
+ * swfs each contain their own unique version of
+ * a source file and we'd like to be able to 
+ * refer to any one location freely 
+ * 
+ * It is modelled after the Collection interface
+ */
+public class LocationCollection
+{
+	private ArrayList<Location> m_locations = new ArrayList<Location>();
+
+	public boolean		add(Location l)			{ return m_locations.add(l); }
+	public boolean		contains(Location l)	{ return m_locations.contains(l); }
+	public boolean		remove(Location l)		{ return m_locations.remove(l); }
+	public boolean		isEmpty()				{ return m_locations.isEmpty(); }
+	public Iterator<Location> iterator()		{ return m_locations.iterator(); }
+
+    // Return the first Location object or null
+	public Location     first()					{ return ( (m_locations.size() > 0) ? m_locations.get(0) : null ); }
+
+    // Return the last Location object or null
+    public Location     last()                  { return ( (m_locations.size() > 0) ? m_locations.get(m_locations.size() - 1) : null ); }
+
+	/**
+	 * Removes Locations from the Collection which contain
+	 * SourceFiles with Ids in the range [startingId, endingId].
+	 */
+	public void removeFileIdRange(int startingId, int endingId)
+	{
+		Iterator<Location> i = iterator();
+		while(i.hasNext())
+		{
+			Location l = i.next();
+			int id = (l.getFile() == null) ? -1 : l.getFile().getId();
+			if (id >= startingId && id <= endingId)
+				i.remove();
+		}
+	}
+
+	/**
+	 * See if the collection contains a Location 
+	 * which is identical to the given file id and 
+	 * line number
+	 */
+	public boolean contains(int fileId, int line)
+	{
+		boolean found = false;
+		Iterator<Location> i = iterator();
+		while(i.hasNext() && !found)
+		{
+			Location l = i.next();
+			int id = (l.getFile() == null) ? -1 : l.getFile().getId();
+			if (id == fileId && l.getLine() == line)
+				found = true;
+		}
+		return found;
+	}
+
+	/** for debugging */
+	@Override
+	public String toString()
+	{
+		return m_locations.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/NoMatchException.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/NoMatchException.java b/debugger/src/main/java/flex/tools/debugger/cli/NoMatchException.java
new file mode 100644
index 0000000..98dde02
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/NoMatchException.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+/**
+ * While attempting to resolve a function name or filename, no match
+ * was found.  For example, this is thrown if the user enters
+ * "break foo.mxml:12" but there is no file called "foo.mxml".
+ */
+public class NoMatchException extends Exception
+{
+    private static final long serialVersionUID = 721945420519126096L;
+    
+    public NoMatchException() {}
+	public NoMatchException(String s) { super(s); }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/StringIntArray.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/StringIntArray.java b/debugger/src/main/java/flex/tools/debugger/cli/StringIntArray.java
new file mode 100644
index 0000000..76db507
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/StringIntArray.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import java.util.ArrayList;
+import java.util.AbstractList;
+
+/**
+ * This class wraps a Nx2 array and provides a List interface
+ * for each of the 2 columns of the array.
+ *
+ * Its main purpose is to provide the method elementsStartingWith()
+ * which returns a ArrayList of index numbers for each element whose
+ * String component matches the provided argument.
+ */
+public class StringIntArray extends AbstractList<Object>
+{
+	Object[]    m_ar;
+	int			m_size = 0;
+	double		m_growthRatio = 1.60;
+
+	public StringIntArray(Object[] ar)
+	{
+		m_ar = ar;
+		m_size = m_ar.length;
+	}
+
+	public StringIntArray()	{ this(10); }
+
+	public StringIntArray(int size)
+	{
+		m_ar = new Object[size];
+		m_size = 0;
+	}
+
+	@Override
+	public Object		get(int at)				{ return m_ar[at];	}
+	@Override
+	public int			size()					{ return m_size; }
+
+	public Object[]		getElement(int at)		{ return (Object[])get(at);	}
+	public String		getString(int at)		{ return (String)getElement(at)[0]; }
+	public Integer		getInteger(int at)		{ return (Integer)getElement(at)[1]; }
+	public int			getInt(int at)			{ return getInteger(at).intValue(); }
+
+	/**
+	 * Sequentially walk through the entire list 
+	 * matching the String components against the 
+	 * given string 
+	 */
+	public ArrayList<Integer> elementsStartingWith(String s)
+	{
+		ArrayList<Integer> alist = new ArrayList<Integer>();
+		for(int i=0; i<m_size; i++)
+			if ( getString(i).startsWith(s) )
+				alist.add( new Integer(i) );
+
+		return alist;
+	}
+
+	@Override
+	public void add(int at, Object e)
+	{
+		// make sure there is enough room in the array, then add the element 
+		ensureCapacity(1);
+		int size = size();
+
+		// open a spot for the element and stick it in
+//		System.out.println("add("+at+"), moving "+at+" to "+(at+1)+" for "+(size-at)+",size="+size);
+		System.arraycopy(m_ar, at, m_ar, at+1, size-at);
+		m_ar[at] = e;
+
+		m_size++;
+	}
+
+	@Override
+	public Object remove(int at)
+	{
+		int size = size();
+		Object o = m_ar[at];
+
+//		System.out.println("remove("+at+"), moving "+(at+1)+" to "+at+" for "+(size-at+1)+",size="+size);
+		System.arraycopy(m_ar, at+1, m_ar, at, size-at+1);
+		m_size--;
+
+		return o;
+	}
+
+	void ensureCapacity(int amt)
+	{
+		int size = size();
+		int newSize = amt+size;
+		if (newSize > m_ar.length)
+		{
+			// we need a new array, compute a good size for it
+			double growTo = m_ar.length * m_growthRatio;   // make bigger
+			if (newSize > growTo)
+				growTo += newSize + (newSize * m_growthRatio);
+
+			Object[] nAr = new Object[(int)growTo+1];
+			System.arraycopy(m_ar, 0, nAr, 0, m_ar.length);
+			m_ar = nAr;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/VariableFacade.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/VariableFacade.java b/debugger/src/main/java/flex/tools/debugger/cli/VariableFacade.java
new file mode 100644
index 0000000..eda7784
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/VariableFacade.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import flash.tools.debugger.NoResponseException;
+import flash.tools.debugger.NotConnectedException;
+import flash.tools.debugger.NotSuspendedException;
+import flash.tools.debugger.Session;
+import flash.tools.debugger.Value;
+import flash.tools.debugger.Variable;
+import flash.tools.debugger.concrete.PlayerSession;
+import flash.tools.debugger.events.FaultEvent;
+
+/**
+ * A VariableFacade provides a wrapper around a Variable object
+ * that provides a convenient way of storing parent information.
+ * 
+ * Don't ask me why we didn't just add a parent member to 
+ * Variable and be done with it.
+ */
+public class VariableFacade implements Variable
+{
+	Variable	m_var;
+	long		m_context;
+	String		m_name;
+	String		m_path;
+	int m_isolateId;
+
+	public VariableFacade(Variable v, long context, int m_isolateId)		{ init(context, v, null, m_isolateId); }
+	public VariableFacade(long context, String name, int m_isolateId)	{ init(context, null, name, m_isolateId); }
+
+	void init(long context, Variable v, String name, int isolateId)
+	{
+		m_var = v;
+		m_context = context;
+		m_name = name;
+		m_isolateId = isolateId;
+	}
+
+	/**
+	 * The variable interface 
+	 */
+	public String		getName()								{ return (m_var == null) ? m_name : m_var.getName(); }
+	public String		getQualifiedName()						{ return (m_var == null) ? m_name : m_var.getQualifiedName(); }
+	public String		getNamespace()							{ return m_var.getNamespace(); }
+	public int			getLevel()								{ return m_var.getLevel(); }
+	public String		getDefiningClass()						{ return m_var.getDefiningClass(); }
+	public int			getAttributes()							{ return m_var.getAttributes(); }
+	public int			getScope()								{ return m_var.getScope(); }
+	public boolean		isAttributeSet(int variableAttribute)	{ return m_var.isAttributeSet(variableAttribute); }
+	public Value		getValue()								{ return m_var.getValue(); }
+	public boolean		hasValueChanged(Session s)				{ return m_var.hasValueChanged(s); }
+	public FaultEvent setValue(Session s, int type, String value) throws NotSuspendedException, NoResponseException, NotConnectedException
+	{
+		return ((PlayerSession)s).setScalarMember(m_context, getQualifiedName(), type, value, m_var.getIsolateId());
+	}
+	@Override
+	public String		toString()								{ return (m_var == null) ? m_name : m_var.toString(); }
+	public String		getPath()								{ return m_path; }
+	public void			setPath(String path)					{ m_path = path; }
+	public boolean needsToInvokeGetter()						{ return m_var.needsToInvokeGetter(); }
+	public void invokeGetter(Session s) throws NotSuspendedException, NoResponseException, NotConnectedException
+	{
+		m_var.invokeGetter(s);
+	}
+
+	/**
+	 * Our lone get context (i.e. parent) interface 
+	 */
+	public long			getContext()									{ return m_context; }
+	public Variable		getVariable()									{ return m_var; }
+	@Override
+	public int getIsolateId() {
+		return m_isolateId;
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/java/flex/tools/debugger/cli/WatchAction.java
----------------------------------------------------------------------
diff --git a/debugger/src/main/java/flex/tools/debugger/cli/WatchAction.java b/debugger/src/main/java/flex/tools/debugger/cli/WatchAction.java
new file mode 100644
index 0000000..3229928
--- /dev/null
+++ b/debugger/src/main/java/flex/tools/debugger/cli/WatchAction.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flex.tools.debugger.cli;
+
+import flash.tools.debugger.Watch;
+
+/**
+ * An object that relates a CLI debugger watchpoint with the
+ * actual Watch obtained from the Session
+ */
+public class WatchAction
+{
+	Watch		m_watch;
+	int			m_id;             
+
+	public WatchAction(Watch w) 
+	{
+		init(w);
+	}
+
+	void init(Watch w)
+	{
+		m_watch = w;
+		m_id = BreakIdentifier.next();
+	}
+
+	/* getters */
+	public int			getId()					{ return m_id; }
+	public long			getVariableId()			{ return m_watch.getValueId(); }
+	public int			getKind()				{ return m_watch.getKind(); }
+	public Watch		getWatch()				{ return m_watch; }
+
+	public String		getExpr()
+	{
+		String memberName = m_watch.getMemberName();
+		int namespaceSeparator = memberName.indexOf("::"); //$NON-NLS-1$
+		if (namespaceSeparator != -1)
+			memberName = memberName.substring(namespaceSeparator + 2);
+		return "#"+getVariableId()+"."+memberName; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/* setters */
+	public void			resetWatch(Watch w)		{ m_watch = w; }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg
----------------------------------------------------------------------
diff --git a/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg
new file mode 100644
index 0000000..d2918be
--- /dev/null
+++ b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg
@@ -0,0 +1,336 @@
+package flash.tools.debugger.expression;
+
+header
+{
+	/*
+    
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+    
+          http://www.apache.org/licenses/LICENSE-2.0
+    
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+
+		AS3DebuggerBURM.java is a Bottom-Up Rewrite Machine for ActionScript 3.0.
+
+		A BURM recognizes patterns of nodes within an tree (in this case, an
+		abstract syntax tree for AS 3.0 expressions) and performs rule-based reduction
+		on them (in this case producing DebuggerValues).
+
+		AS3DebuggerBURM.java is generated from AS3DebuggerBURM.jbg using JBurg, an open-source
+		Java implementation of a Bottom-Up Rewrite Generator.
+
+		The most important entry point of this class is burm(),
+		which is called by the code generator.
+	*/
+
+    import static org.apache.flex.abc.ABCConstants.*;
+    import static org.apache.flex.compiler.tree.ASTNodeID.*;
+
+    import org.apache.flex.compiler.constants.IASLanguageConstants;
+    import org.apache.flex.compiler.exceptions.BURMAbortException;
+    import org.apache.flex.compiler.problems.*;
+    import org.apache.flex.compiler.internal.semantics.SemanticUtils;
+    import org.apache.flex.compiler.tree.ASTNodeID;
+    import org.apache.flex.compiler.tree.as.IASNode;
+    import org.apache.flex.compiler.tree.as.ITryNode;
+}
+
+INodeType IASNode;
+OpcodeType ASTNodeID;
+
+/*
+ *  The I-node type is IASNode, and it has its own adapter.
+ */
+INodeAdapter org.apache.flex.compiler.internal.as.codegen.IASNodeAdapter;
+
+//  Generate Java output.
+Language java;
+
+// Return type of all the reductions
+ReturnType Object;
+
+/**
+ *  This is a name to use in an expression context.
+ *
+ *  TODO: What type should this be?
+ */
+ReturnType name = Object;
+
+ReturnType decl_name = Object;
+
+/**
+ *  Qualified name - this acts the same as a name above, but is built a little differently.
+ */
+ReturnType qualifiedName = Object;
+ReturnType qualifiedNamePart = Object;
+
+/**
+ *  This is a name used in a type annotation context, such as 'Foo' in:
+ *      var x : Foo;
+ *  It is a Binding, as type annotations must always be resolved.
+ *  A type_name also allows '*', which can't happen in a general expression context.
+ */
+ReturnType type_name = Object;
+
+/**
+ *  This is a name used in a new context, such as 'Foo' in:
+ *      new Foo();
+ *  We can do additional analysis when the new expression resolves to a Type, which
+ *  is why we have a special name for the new expression.
+ */
+ReturnType new_type_name = Object;
+
+ReturnType dottedNamePart = String;
+
+ReturnType non_resolving_identifier = String;
+
+ReturnType runtime_name_expression = Object;
+ReturnType multinameL = Object;
+ReturnType e4x_literal = String;
+
+ReturnType integer_constant = Integer;
+ReturnType uint_constant = Long;
+ReturnType double_constant = Double;
+ReturnType string_constant = String;
+ReturnType boolean_constant = Boolean;
+ReturnType float_constant = Float;
+
+ReturnType numeric_constant = Number;
+
+ReturnType constant_value = Object;
+
+/**
+ * Value to use to indicate a cost that is not feasible
+ */
+JBurg.Constant ERROR_TRAP = 268435456;
+
+{
+    final static boolean NEED_VALUE = true;
+    final static boolean DISCARD_VALUE = false;
+
+
+    /**
+     *  The reducer has all the implementation
+     *  logic for the rewrite; the BURM constructed
+     *  by this specification drives that logic.
+     */
+    AS3DebuggerReducer reducer;
+
+
+    /*
+     *  **  Cost functions  **
+     * Cost functions are Java code that returns an int value.
+     * The value is used to compute the cost of a particular
+     * candidate reduction. The BURM searches for the lowest
+     * total cost sequence of reductions to transform the input
+     * AST into a value, so low values mean "good cost," higher
+     * values mean "less desirable."   The total cost of a reduction
+     * is always strictly less than Integer.MAX_VALUE; a cost of
+     * Integer.MAX_VALUE tells the pattern matcher that the
+     * reduction is not feasible.
+     */
+
+
+    /**
+     *  @return "feasible" if the reducer can reduce this to a dotted name.
+     */
+    int isDottedName(IASNode iNode)
+    {
+       return reducer.isDottedName(iNode);
+    }
+
+    /**
+     *  @return "feasible" if the reducer can reduce this to a package name.
+     */
+    int isPackageName(IASNode iNode)
+    {
+       return reducer.isPackageName(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this node's qualifier is a compile-time constant.
+     */
+    int qualifierIsCompileTimeConstant(IASNode iNode)
+    {
+       return reducer.qualifierIsCompileTimeConstant(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this node can be resolved to a compile-time constant.
+     */
+    int isCompileTimeConstant(IASNode iNode)
+    {
+       return reducer.isCompileTimeConstant(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this function call node can be resolved to a compile-time constant function.
+     */
+    int isCompileTimeConstantFunction(IASNode iNode)
+    {
+       return reducer.isCompileTimeConstantFunction(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this binary node has at least one expression that is
+     *          of type "float".
+     */
+    int isFloatBinOp(IASNode iNode)
+    {
+       return reducer.isFloatBinOp(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this node is for 'new Array()'.
+     */
+    int isEmptyArrayConstructor(IASNode iNode)
+    {
+        return reducer.isEmptyArrayConstructor(iNode);
+    }
+
+    /**
+     *  @return "feasible" if this node is for 'new Object()'.
+     */
+    int isEmptyObjectConstructor(IASNode iNode)
+    {
+        return reducer.isEmptyObjectConstructor(iNode);
+    }
+
+    /**
+     * @return "feasible" if this node resolves to a type definition.
+     */
+    int isKnownType(IASNode iNode)
+    {
+        return reducer.isKnownType(iNode);
+    }
+
+    /**
+     * @return "feasible" if the type parameter resolves to a type definition.
+     */
+    int parameterTypeIsConstant(IASNode iNode)
+    {
+        return reducer.parameterTypeIsConstant(iNode);
+    }
+
+    /**
+     *  recordError is a convenience method for error reductions;
+     *  it adds a problem to the current set of problems and
+     */
+    Object recordError(ICompilerProblem problem)
+    {
+        return new Object();
+    }
+
+    int isIntLiteral(IASNode iNode)
+    {
+        return reducer.isIntLiteral(iNode);
+    }
+
+    int isUintLiteral(IASNode iNode)
+    {
+        return reducer.isUintLiteral(iNode);
+    }
+
+    int isDoubleLiteral(IASNode iNode)
+    {
+        return reducer.isDoubleLiteral(iNode);
+    }
+
+    int isFloatLiteral(IASNode iNode)
+    {
+        return reducer.isDoubleLiteral(iNode);
+    }
+
+}
+
+/*
+ *  Error recovery routine: deduce what we can from the problem
+ *  tree, then abort this BURM with an exception that the caller
+ *  can catch and ignore.
+ */
+DefaultErrorHandler
+{
+    BURMAbortException.abort();
+}
+
+/*
+ *  Patterns and rules are stored in their own, shareable file.
+ */
+JBurg.include "../compiler/src/org/apache/flex/compiler/internal/as/codegen/CmcPatterns.jbg"
+
+
+/*
+ * This pattern is used by the debugger to call special functions 
+ * like $obj() when handling the ‘print #ObjectRefNumber’ feature.
+ * I don’t think I would have a rule like this in the compiler as 
+ * calling foo() where foo is just an identifier is probably likely
+ * and “foo” has to be resolved from an identifier to, in most cases,
+ * a MemberAccessExpression, but I don’t think folks print function
+ * calls in the debugger.  And even if they do, there is a chance it
+ * will work anyway.
+ *
+ * If the debugger is missing the ability to print something, it may be
+ * that a new Pattern and Rule need to be added.  First, set a breakpoint
+ * in DebuggerExpressionEvaluator at the call to burm.burm().  Examine 
+ * the node to make sure it was parsed correctly into a tree of nodes.
+ *
+ * If the node tree is correct, step into the burm() call.  You should
+ * see the code call label() and return a different tree of instances.
+ * For lots of things, there are custom classes like:
+ *   JBurgAnnotation_FunctionCallID_2_n
+ * which represents a FunctionCallID in the AST.  If the top node is an
+ * instance of JBurgAnnotationGeneral, that means that the BURM did not
+ * expect a node of that type.  This may be true throughout the tree
+ * but I’ve seen that ContainerID, which represents parenthesis around
+ * parameters to a function also becomes a JBurgAnnotationGeneral because
+ * the BURM theoretically never examines that node in the tree, it examines
+ * its children.
+ *
+ * If a pattern is missing, add the pattern.  A Pattern seems to be a node ID
+ * with a parameter list of the children node ID’s or other Patterns.  The
+ * names you use in the parameter list will be used in the reduction function
+ * later.
+ *
+ * Then add a Rule for it in AS3DebuggerRules.jbg.  
+ *
+ * It seems like the BURM
+ * operates on “levels” of constructs, the higher order construct being an
+ * “expression”.  Expressions are composed of other expressions or lower-level
+ * constructs like name or constants (like uint_constant) or literals (like
+ * boolean_literal.  It seems like, even if the string you want the debugger
+ * to print is just a string or number, it may get “reduced” by the BURM into
+ * higher-level things first.
+ *
+ * So, I think most new Rules for complex patterns will be an expression,
+ * but if it doesn’t recognize a constant of some sort you may need to 
+ * add that.  Anyway, you add an expression like the one in this change list
+ * and then assign a value (or cost) for the rule.  Lower numbers 
+ * (but greater than 0) win.  The actual cost is computed by factoring in the
+ * cost of reducing the children.
+ *
+ * On the next line below the rule and its cost, add, for most things, a
+ * JBurg.reduction method call that you will write to do the reduction. Pass
+ * in the node (__p) and any of the parameters from the Pattern.
+ *
+ * Next, in AS3DebuggerReducer.java, add that reduction method and fill
+ * in the method body.  Try to look for similar reductions and copy what
+ * they do.  For the debugger, you eventually want to return a DebuggerValue.
+ * DebuggerValues seem to be what expressions reduce to and you’ll find they
+ * get passed into the reduction method as well.
+ *
+ */
+// $obj()
+Pattern functionCallSpecial
+FunctionCallID(IdentifierID(void) specialName, ContainerID(expression args*));
+
+
+JBurg.include "AS3DebuggerRules.jbg"

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerCompoundAssignmentRules.jbg
----------------------------------------------------------------------
diff --git a/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerCompoundAssignmentRules.jbg b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerCompoundAssignmentRules.jbg
new file mode 100644
index 0000000..5a6b955
--- /dev/null
+++ b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerCompoundAssignmentRules.jbg
@@ -0,0 +1,28 @@
+/*
+    
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+    
+          http://www.apache.org/licenses/LICENSE-2.0
+    
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+
+*/
+
+expression = Pattern compoundAssignToName : 0
+JBurg.Reduction reducer.compoundBinaryAssignmentNameExpr(__p, operand, expr, Op_COMPOUND_ASSIGN);
+
+
+expression = Pattern compoundAssignToMember : 0
+JBurg.Reduction reducer.compoundBinaryAssignmentMemberExpr(__p, stem, member,  expr, Op_COMPOUND_ASSIGN);
+
+expression = Pattern compoundAssignToBracket : 0
+JBurg.Reduction reducer.compoundBinaryAssignmentBracketExpr(__p, stem, index,  expr, Op_COMPOUND_ASSIGN);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerRules.jbg
----------------------------------------------------------------------
diff --git a/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerRules.jbg b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerRules.jbg
new file mode 100644
index 0000000..9664a03
--- /dev/null
+++ b/debugger/src/main/jburg/flash/tools/debugger/expression/AS3DebuggerRules.jbg
@@ -0,0 +1,746 @@
+/*
+    
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+    
+          http://www.apache.org/licenses/LICENSE-2.0
+    
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+
+*/
+Pattern foldedExpressionPattern
+FoldedExpressionID(void);
+ 
+foldedExpression = Pattern foldedExpressionPattern: 1
+JBurg.Reduction reducer.reduceLazyExpression(__p);
+
+Pattern logicalAndExprLazy
+Op_LogicalAndID(expression l, foldedExpression r);
+
+Pattern logicalOrExprLazy
+Op_LogicalOrID(expression l, foldedExpression r);
+
+/*
+ *  AS3DebuggerRules.jbg holds the rewrite rules for debugger support.
+ *  @see compiler/CmcPatterns.jbg, which holds the corresponding patterns.
+ */
+
+/*
+ *  Assignment to a simple name.
+ */
+expression = Pattern assignToNameExpr: 2
+JBurg.Reduction reducer.reduce_assignToNameExpr_to_expression(__p, lval,r);
+
+/*
+ *  Assignment to a more general lvalue.
+ */
+expression = Pattern assignToMemberExpr : 10
+JBurg.Reduction reducer.reduce_assignToMemberExpr_to_expression(__p, stem, member, r);
+
+/*
+ *  Assignment to a[i] type lvalue.
+ */
+expression = Pattern assignToBracketExpr: 1
+JBurg.Reduction reducer.reduce_assignToBracketExpr_to_expression(__p, stem, index, r, false);
+
+expression = Pattern assignToSuperBracketExpr: 1
+JBurg.Reduction reducer.reduce_assignToBracketExpr_to_expression(__p, null, index, r, true);
+
+/*
+ *  Assignment to qualified names and attributes.
+ */
+expression = Pattern assignToQualifiedMemberExpr : 1
+JBurg.Reduction reducer.reduce_assignToQualifiedMemberExpr(__p, stem, qualifier, member, r, NEED_VALUE);
+
+expression = Pattern assignToQualifiedRuntimeMemberExpr : 1
+JBurg.Reduction reducer.reduce_assignToQualifiedRuntimeMemberExpr(__p, stem, qualifier, member, r, NEED_VALUE);
+
+expression = Pattern assignToQualifiedAttributeExpr : 1
+JBurg.Reduction reducer.reduce_assignToQualifiedAttributeExpr(__p, stem, qualifier, attribute, r, NEED_VALUE);
+
+expression = Pattern assignToUnqualifiedRuntimeAttributeExpr : 1
+JBurg.Reduction reducer.reduce_assignToUnqualifiedRuntimeAttributeExpr(__p, stem, rt_attr_name, r, NEED_VALUE);
+
+expression = Pattern assignToUnqualifiedRuntimeDescendantsAttributeExpr : 1
+JBurg.Reduction reducer.reduce_assignToUnqualifiedRuntimeAttributeExpr(__p, stem, rt_attr_name, r, NEED_VALUE);
+
+/*
+ *  Assignment to descendants.
+ */
+expression = Pattern assignToDescendantsExpr : 1
+JBurg.Reduction reducer.reduce_assignToDescendantsExpr(__p, stem, member, r, NEED_VALUE);
+
+/*
+ *  Error trap for diagnosing parser/CG mismatches.
+ *  The cost is unfeasibly high for a normal reduction,
+ *  so this will only be chosen if no other reduction works.
+ */
+expression = Op_AssignId(expression non_lvalue, expression rvalue ) : ERROR_TRAP
+JBurg.Reduction reducer.error_reduce_Op_AssignId(__p, non_lvalue, rvalue);
+
+/*
+ *  Miscellaneous void expressions.
+ */
+expression = Pattern nilExpr : 1
+JBurg.Reduction reducer.reduce_nilExpr_to_expression(__p);
+
+/*
+ *  Binary logical operators.
+ */
+comparison_expression = Pattern equalExpr : 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_equals);
+
+comparison_expression = Pattern neqExpr : 1
+JBurg.Reduction reducer.reduce_neqExpr (__p, l, r);
+
+comparison_expression = Pattern stricteqExpr : 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_strictequals);
+
+comparison_expression = Pattern strictneqExpr : 1
+JBurg.Reduction reducer.reduce_strictneqExpr (__p, l, r);
+
+comparison_expression = Pattern greaterThanExpr: 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_greaterthan);
+
+comparison_expression = Pattern greaterThanEqExpr: 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_greaterequals);
+
+comparison_expression = Pattern lessExpr : 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_lessthan);
+
+comparison_expression = Pattern lessEqExpr : 1
+JBurg.Reduction reducer.binaryOp (__p, l, r, OP_lessequals);
+
+//  Closure rule: any comparison_expression
+//  is also an expression without further conversion.
+expression = comparison_expression;
+
+expression = Pattern logicalAndExprLazy : 5
+JBurg.Reduction reducer.reduce_logicalAndExpr (__p, l, r);
+
+expression = Pattern logicalOrExprLazy : 5
+JBurg.Reduction reducer.reduce_logicalOrExpr (__p, l, r);
+
+expression = Pattern logicalNotExpr : 1
+JBurg.Reduction reducer.reduce_logicalNotExpr (__p, expr);
+
+expression = Pattern ternaryExpr : 1
+JBurg.Reduction reducer.reduce_ternaryExpr (__p, test, when_true, when_false);
+
+/*
+ *  Binary arithmetic operators.
+ */
+
+expression = Pattern divideExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_divide);
+
+expression = Pattern multExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_multiply);
+
+expression = Pattern moduloExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_modulo);
+
+expression = Pattern addExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_add);
+
+expression = Pattern subtractExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_subtract);
+
+expression = Pattern bitwiseLeftShiftExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_lshift);
+
+expression = Pattern bitwiseRightShiftExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_rshift);
+
+expression = Pattern bitwiseUnsignedRightShiftExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_urshift);
+
+expression = Pattern bitwiseAndExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_bitand);
+
+expression = Pattern bitwiseOrExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_bitor);
+
+expression = Pattern bitwiseXorExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, l, r, OP_bitxor);
+
+/*
+ *  pre/postfix unary operators.
+ */
+
+expression = Pattern postIncNameExpr : 7
+JBurg.Reduction reducer.reduce_postIncNameExpr(__p, unary, true);
+
+expression = Pattern preIncNameExpr : 7
+JBurg.Reduction reducer.reduce_preIncNameExpr(__p, unary, true);
+
+expression = Pattern preIncMemberExpr : 8
+JBurg.Reduction reducer.reduce_preIncMemberExpr(__p, stem, field, true);
+
+expression = Pattern postIncMemberExpr: 8
+JBurg.Reduction reducer.reduce_postIncMemberExpr(__p, stem, field, true);
+
+expression = Pattern preIncBracketExpr: 8
+JBurg.Reduction reducer.reduce_preIncBracketExpr(__p, stem, index, true);
+
+expression = Pattern postIncBracketExpr: 8
+JBurg.Reduction reducer.reduce_postIncBracketExpr(__p, stem, index, true);
+
+expression = Pattern postDecNameExpr : 7
+JBurg.Reduction reducer.reduce_postDecNameExpr(__p, unary, true);
+
+expression = Pattern preDecNameExpr : 7
+JBurg.Reduction reducer.reduce_preDecNameExpr(__p, unary, true);
+
+expression = Pattern preDecMemberExpr : 8
+JBurg.Reduction reducer.reduce_preDecMemberExpr(__p, stem, field, true);
+
+expression = Pattern postDecMemberExpr: 8
+JBurg.Reduction reducer.reduce_postDecMemberExpr(__p, stem, field, true);
+
+expression = Pattern preDecBracketExpr: 8
+JBurg.Reduction reducer.reduce_preDecBracketExpr(__p, stem, index, true);
+
+expression = Pattern postDecBracketExpr: 8
+JBurg.Reduction reducer.reduce_postDecBracketExpr(__p, stem, index, true);
+
+/*
+ *  Unary expressions.
+ */
+expression = Pattern unaryMinusExpr: 1
+JBurg.Reduction reducer.unaryOp(__p, e, OP_negate);
+
+expression = Pattern unaryPlusExpr: 0
+{
+    return reducer.unaryOp(__p, e, OP_convert_d);
+}
+
+expression = Pattern typeofExpr: 10
+JBurg.Reduction reducer.reduce_typeof_expr(__p, expr);
+
+expression = Pattern typeofName: 1
+JBurg.Reduction reducer.reduce_typeof_name(__p, n);
+
+expression = Pattern bitNotExpr: 1
+JBurg.Reduction reducer.unaryOp(__p, unary, OP_bitnot);
+
+/*
+ *  Miscellaneous binary expressions.
+ */
+expression = Pattern istypeExprLate : 1
+JBurg.Reduction reducer.binaryOp(__p, expr, typename, OP_istypelate);
+
+expression = Pattern astypeExprLate : 1
+JBurg.Reduction reducer.binaryOp(__p, expr, typename, OP_astypelate);
+
+expression = Pattern inExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, needle, haystack, OP_in);
+
+expression = Pattern instanceofExpr : 1
+JBurg.Reduction reducer.binaryOp(__p, expr, typename, OP_instanceof);
+
+// lhs += rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_add" \
+    compoundAssignToName="assignPlusToNameExpr" \
+    compoundAssignToMember="assignPlusToMemberExpr" \
+    compoundAssignToBracket="assignPlusToBracketExpr"
+
+// lhs *= rhs    
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_multiply" \
+    compoundAssignToName="assignMultiplyToNameExpr" \
+    compoundAssignToMember="assignMultiplyToMemberExpr" \
+    compoundAssignToBracket="assignMultiplyToBracketExpr"
+
+// lhs -= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_subtract" \
+    compoundAssignToName="assignMinusToNameExpr" \
+    compoundAssignToMember="assignMinusToMemberExpr" \
+    compoundAssignToBracket="assignMinusToBracketExpr"
+
+// lhs /= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_divide" \
+    compoundAssignToName="assignDivideToNameExpr" \
+    compoundAssignToMember="assignDivideToMemberExpr" \
+    compoundAssignToBracket="assignDivideToBracketExpr"
+
+// lhs %= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_modulo" \
+    compoundAssignToName="assignModuloToNameExpr" \
+    compoundAssignToMember="assignModuloToMemberExpr" \
+    compoundAssignToBracket="assignModuloToBracketExpr"
+
+// lhs <<= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_lshift" \
+    compoundAssignToName="assignLeftShiftToNameExpr" \
+    compoundAssignToMember="assignLeftShiftToMemberExpr" \
+    compoundAssignToBracket="assignLeftShiftToBracketExpr"
+
+// lhs <<= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_rshift" \
+    compoundAssignToName="assignRightShiftToNameExpr" \
+    compoundAssignToMember="assignRightShiftToMemberExpr" \
+    compoundAssignToBracket="assignRightShiftToBracketExpr"
+
+// lhs >>>= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_urshift" \
+    compoundAssignToName="assignUnsignedRightShiftToNameExpr" \
+    compoundAssignToMember="assignUnsignedRightShiftToMemberExpr" \
+    compoundAssignToBracket="assignUnsignedRightShiftToBracketExpr"
+
+// lhs &= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_bitand" \
+    compoundAssignToName="assignBitwiseAndToNameExpr" \
+    compoundAssignToMember="assignBitwiseAndToMemberExpr" \
+    compoundAssignToBracket="assignBitwiseAndToBracketExpr"
+  
+// lhs |= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_bitor" \
+    compoundAssignToName="assignBitwiseOrToNameExpr" \
+    compoundAssignToMember="assignBitwiseOrToMemberExpr" \
+    compoundAssignToBracket="assignBitwiseOrToBracketExpr"
+    
+// lhs ^= rhs
+JBurg.include "AS3DebuggerCompoundAssignmentRules.jbg" \
+    Op_COMPOUND_ASSIGN="OP_bitxor" \
+    compoundAssignToName="assignBitwiseXorToNameExpr" \
+    compoundAssignToMember="assignBitwiseXorToMemberExpr" \
+    compoundAssignToBracket="assignBitwiseXorToBracketExpr"
+    
+/*
+ *  Primary expressions.
+ */
+expression = Pattern memberAccessExpr : 10
+JBurg.Reduction reducer.reduce_memberAccessExpr (__p, stem, member, OP_getproperty);
+
+expression = Pattern  qualifiedMemberAccessExpr : 10
+JBurg.Reduction reducer.reduce_qualifiedMemberAccessExpr(__p, stem, qualifier, member, OP_getproperty);
+
+expression = Pattern  qualifiedDescendantsExpr : 10
+JBurg.Reduction reducer.reduce_qualifiedMemberAccessExpr(__p, stem, qualifier, member, OP_getdescendants);
+
+expression = Pattern qualifiedDescendantsRuntimeExpr : 1
+JBurg.Reduction reducer.reduce_qualifiedAttributeRuntimeMemberExpr(__p, stem, qualifier, runtime_member, OP_getdescendants);
+
+expression = Pattern qualifiedAttributeExpr : 1
+JBurg.Reduction reducer.reduce_qualifiedAttributeExpr(__p, stem, qualifier, member, OP_getproperty);
+
+expression = Pattern qualifiedDescendantsAttributeExpr : 1
+JBurg.Reduction reducer.reduce_qualifiedAttributeExpr(__p, stem, qualifier, member, OP_getdescendants);
+
+expression = Pattern qualifiedAttributeRuntimeMemberExpr : 1
+JBurg.Reduction reducer.reduce_qualifiedAttributeRuntimeMemberExpr(__p, stem, qualifier, runtime_member, OP_getproperty);
+
+expression = Pattern qualifiedDescendantsRuntimeMemberExpr : 1
+JBurg.Reduction reducer.reduce_qualifiedAttributeRuntimeMemberExpr(__p, stem, qualifier, runtime_member, OP_getdescendants);
+
+//  Prefer the basic memberAccessExpr pattern where feasible.
+expression = Pattern qualifiedMemberRuntimeNameExpr : 100
+JBurg.Reduction reducer.reduce_qualifiedMemberRuntimeNameExpr(__p, stem, qualifier, runtime_member);
+
+expression = Pattern unqualifiedAttributeExpr : 1
+JBurg.Reduction reducer.reduce_unqualifiedAttributeExpr(__p, stem, expr, OP_getproperty);
+
+expression = Pattern unqualifiedDescendantsAttributeExpr : 1
+JBurg.Reduction reducer.reduce_unqualifiedAttributeExpr(__p, stem, expr, OP_getdescendants);
+
+expression = Pattern runtimeAttributeExp : 1
+JBurg.Reduction reducer.reduce_runtimeAttributeExp(__p, expr);
+
+expression = Pattern arrayIndexExpr : 1
+JBurg.Reduction reducer.reduce_arrayIndexExpr (__p, stem, false, index);
+
+expression = Pattern superIndexExpr : 1
+JBurg.Reduction reducer.reduce_arrayIndexExpr (__p, null, true, index);
+
+expression = Pattern functionCallExpr : 3  // Cost artificially inflated
+JBurg.Reduction reducer.reduce_functionCallExpr_to_expression (__p, method_name, args);
+
+expression = Pattern functionCallSpecial : 1  // We want this to win over other function calls to simple names
+JBurg.Reduction reducer.reduce_functionCallSpecial_to_expression (__p, specialName, args);
+
+expression = Pattern newVectorLiteral: 0
+JBurg.Reduction reducer.reduce_newVectorLiteral(__p, literal);
+
+//  'new Whatever(...)' has cost 2, so it gets beaten by the two previous rules.
+//  Use this reduction if the type is known;
+//  it allows much better error checking of the constructor call.
+expression = Pattern newExpr : 2
+JBurg.Reduction reducer.reduce_newExpr (__p, class_binding, args);
+
+expression = Pattern newMemberProperty: 10
+JBurg.Reduction reducer.reduce_newMemberProperty(__p, stem, member, args);
+
+expression = Pattern newAsRandomExpr : 30
+JBurg.Reduction reducer.reduce_newAsRandomExpr (__p, random_expr, args);
+
+expression = Pattern functionCallOfSuperclassMethod : 2
+JBurg.Reduction reducer.reduce_functionCallOfSuperclassMethod_to_expression (__p, null, method_name, args);
+
+expression = Pattern functionCallOfExplicitObjectSuperclassMethod : 2
+JBurg.Reduction reducer.reduce_functionCallOfSuperclassMethod_to_expression (__p, stem, method_name, args);
+
+expression = Pattern functionAsMemberExpr : 4  //  Cost inflated to prefer functionCallOfSuperclassMethod
+JBurg.Reduction reducer.reduce_functionAsMemberExpr (__p, stem, method_name, args);
+
+expression = Pattern functionAsBracketExpr : 4
+JBurg.Reduction reducer.reduce_functionAsBracketExpr (__p, stem, index, args);
+
+expression = Pattern functionAsRandomExpr : 30
+JBurg.Reduction reducer.reduce_functionAsRandomExpr (__p, random_expr, args);
+
+/*
+ *  Delete expressions.
+ */
+expression = Pattern deleteNameExpr: 2
+JBurg.Reduction reducer.reduce_deleteNameExpr(__p, n);
+
+expression = Pattern deleteBracketExpr: 1
+JBurg.Reduction reducer.reduce_deleteBracketExpr(__p, stem, index);
+
+expression = Pattern deleteAtBracketExpr: 1
+JBurg.Reduction reducer.reduce_deleteAtBracketExpr(__p, stem, index);
+
+expression = Pattern deleteMemberExpr: 1
+JBurg.Reduction reducer.reduce_deleteMemberExpr(__p, stem, field);
+
+expression = Pattern deleteRuntimeNameExpr: 1
+JBurg.Reduction reducer.reduce_deleteRuntimeNameExpr(__p, stem, rt_name);
+
+expression = Pattern deleteDescendantsExpr: 1
+JBurg.Reduction reducer.reduce_deleteDescendantsExpr(__p, stem, field);
+
+expression = Pattern deleteAnyExprExprExpr: 2000
+JBurg.Reduction reducer.reduce_deleteExprExprExpr(__p, expr);
+
+/*
+ *  Comma expression.
+ */
+expression = Pattern commaExpr: 0
+JBurg.Reduction reducer.reduce_commaExpr(__p, payload_expr, exprs);
+
+/*
+ *  Names and reference expressions built from names.
+ */
+name = Pattern simpleName : 0
+JBurg.Reduction reducer.reduce_simpleName (__p);
+
+qualifiedNamePart = Pattern simpleName: 0
+JBurg.Reduction reducer.getIdentifierContent(__p);
+
+name = Pattern typedVariableExpression : 0
+JBurg.Reduction reducer.reduce_typedVariableExpression (__p, var_name, var_type);
+
+dottedNamePart = Pattern dottedName : 0
+JBurg.Reduction reducer.reduce_by_concatenation (__p, first, second);
+
+dottedNamePart = qualifiedNamePart;
+
+name = Pattern dottedName : isDottedName()
+JBurg.Reduction reducer.dottedName (__p, first, second);
+
+name = Pattern dottedName : isPackageName()
+JBurg.Reduction reducer.errorPackageName(__p, first, second);
+
+//  This reduction handles an entire dotted name subtree.
+name = Pattern fullName : 0
+JBurg.Reduction reducer.dottedName(__p, first, second);
+
+//  qualified namespace is the same as a full name,
+//  it's just what gets produced when we're in a use namespace directive
+//     use namespace a.b.Foo;
+name = Pattern qualifiedNamespaceName : 0
+JBurg.Reduction reducer.dottedName(__p, first, second);
+
+//  This reduction handles the bar.T part of foo.bar.T
+dottedNamePart = Pattern fullName : 0
+JBurg.Reduction reducer.reduce_by_concatenation (__p, first, second);
+
+name = Pattern superAccess : 0
+JBurg.Reduction reducer.reduce_superAccess (__p, qualified_name);
+
+//  A bare parameterized type name can only be
+//  used as a type annotation.  In code it's necessary
+//  to expand it into an expression that calls applytype.
+//  Note: this reduction gets an error-trapping cost if
+//  the parameter type is not constant; this forces
+//  expression-oriented reductions to try and reduce
+//  the type parameter as an expression.
+type_name = Pattern parameterizedName : parameterTypeIsConstant()
+JBurg.Reduction reducer.reduce_parameterizedTypeName (__p, base, param);
+
+//  A name can be a type_name, which in combination with
+//  the reduction above yields the set of possible type_names:
+//  identifiers and *
+type_name = name : 1
+JBurg.Reduction reducer.reduce_nameToTypeName(name, true);
+
+//  The 'new' expression takes a pseduo-type name:
+//  when it can be resolved, the semantic analysis
+//  code can check the constructor.  When it can't
+//  be resolved, it's a generalized expression.
+new_type_name = name;
+
+//  Inflate this cost so it's only selected
+//  if the type_name isn't a name.
+new_type_name = type_name : 20
+JBurg.Reduction reducer.reduce_nameToTypeName(type_name, false);
+
+// The parameter of a parameterized type expression may be an expression
+// or a type name; if it resolves to a type, it's a type name.
+type_param_expression = name: isKnownType()
+JBurg.Reduction reducer.reduce_typeNameParameterAsType(__p, name);
+
+// any expression can be used as a type param name in an expression context.
+type_param_expression = expression;
+
+expression = Pattern parameterizedTypeExpression : 1
+JBurg.Reduction reducer.reduce_parameterizedTypeExpression (__p, base, param);
+
+expression = name: 2000
+JBurg.Reduction reducer.transform_name_to_expression(__p, name);
+
+type_name = Pattern voidExpr : 0
+JBurg.Reduction reducer.reduce_voidExpr_to_type_name(__p);
+
+name = Pattern attributeName : 0
+JBurg.Reduction reducer.reduce_attributeName (__p, attr_name);
+
+//  ns1::foo and rt_ns::foo look alike to
+//  the parser, so they must be disambiguated
+//  by checking their semantic annotations.
+name = Pattern namespaceAccess : qualifierIsCompileTimeConstant()
+JBurg.Reduction reducer.reduce_namespaceAccess (__p, qualifier, qualified_name);
+
+//  Error trap for an unresolved namespace in a context
+//  where it must be declared.
+name = Pattern namespaceAccess: ERROR_TRAP
+JBurg.Reduction reducer.error_namespaceAccess(__p, qualifier, qualified_name);
+
+//  A namespace-qualified name reference whose name
+//  is a runtime expression, e.g., ns1::[foo].
+//  The parser doesn't know the difference between
+//  ns1::[foo] and rt_ns::[foo], so we need a cost
+//  function to disambiguate the tree.
+runtime_name_expression = Pattern namespaceMultinameL: qualifierIsCompileTimeConstant()
+JBurg.Reduction reducer.reduce_namespaceMultinameL(__p, qualifier, expr);
+
+runtime_name_expression = Pattern namespaceRTQName : 2000
+JBurg.Reduction reducer.reduce_namespaceRTQName (__p, qualifier, qualfied_name);
+
+expression = Pattern embedExpression : 2
+JBurg.Reduction reducer.reduce_embed(__p);
+
+/*
+ *  E4X expressions (except literals)
+ */
+
+expression = Pattern e4xFilter : 3
+JBurg.Reduction reducer.reduce_e4xFilter (__p, stem, filter);
+
+runtime_name_expression = Pattern namespaceRTQNameL : 2000
+JBurg.Reduction reducer.reduce_namespaceRTQNameL (__p, qualifier, expr);
+
+expression = runtime_name_expression : 1
+JBurg.Reduction reducer.transform_runtime_name_expression(__p, runtime_name_expression);
+
+expression = Pattern runtimeNameExpression: 1
+JBurg.Reduction reducer.reduce_runtimeNameExpression(__p, expr);
+
+name = Pattern namespaceAsName: 1
+JBurg.Reduction reducer.reduce_namespaceAsName_to_name(__p);
+
+expression = Pattern namespaceAsName: 1
+JBurg.Reduction reducer.reduce_namespaceAsName_to_expression(__p);
+
+void_expression = Pattern assignToRuntimeNameExpr: 1
+JBurg.Reduction reducer.reduce_assignToRuntimeNameExpr(__p, lval, r, DISCARD_VALUE);
+
+expression = Pattern assignToRuntimeNameExpr: 1
+JBurg.Reduction reducer.reduce_assignToRuntimeNameExpr(__p, lval, r, NEED_VALUE);
+
+expression = Pattern descendantsExpression : 1
+JBurg.Reduction reducer.reduce_memberAccessExpr(__p, stem, descendants, OP_getdescendants);
+
+/*
+ *  Literals.
+ */
+e4x_literal = Pattern XMLLiteral : 0
+JBurg.Reduction reducer.getStringLiteralContent (__p);
+
+string_constant = e4x_literal;
+
+expression = Pattern XMLContent: 1
+JBurg.Reduction reducer.reduce_XMLContent(__p, exprs);
+
+expression = Pattern XMLList: 2
+JBurg.Reduction reducer.reduce_XMLList(__p, exprs);
+
+expression = Pattern XMLListConst: 1
+JBurg.Reduction reducer.reduce_XMLListConst(__p, elements);
+
+expression = literal;
+literal = object_literal;
+literal = boolean_literal;
+literal = array_literal;
+
+expression = string_constant : 1
+JBurg.Reduction reducer.transform_string_constant(__p, string_constant);
+
+integer_constant = Pattern numericLiteral: isIntLiteral()
+JBurg.Reduction reducer.getIntegerContent(__p);
+
+expression = integer_constant : 1
+JBurg.Reduction reducer.transform_integer_constant(__p, integer_constant);
+
+uint_constant = Pattern numericLiteral: isIntLiteral()
+JBurg.Reduction reducer.getUintContent(__p);
+
+expression = uint_constant : 1
+JBurg.Reduction reducer.transform_uint_constant(__p, uint_constant);
+
+expression = boolean_constant : 1
+JBurg.Reduction reducer.transform_boolean_constant(__p, boolean_constant);
+
+
+/**
+ * Constant values
+ */
+//  Error trap for non-constant expressions
+//  used in a context where only a constant is valid,
+//  e.g., foo() in function needsConstantInit(x = foo()).
+required_constant_value = expression : ERROR_TRAP
+JBurg.Reduction reducer.transform_expression_to_constant_value(__p, expression);
+
+//  A name can be used as a constant in some contexts,
+//  e.g., if it's a Namespace or otherwise known to be
+//  a compile-time constant.
+
+integer_constant = LiteralIntegerZeroID(void) : 1
+JBurg.Reduction reducer.getIntegerZeroContent(__p);
+
+integer_constant = LiteralIntegerID(void) : 1
+JBurg.Reduction reducer.getIntegerContent(__p);
+
+uint_constant = LiteralIntegerZeroID(void) : 1
+JBurg.Reduction reducer.getIntegerZeroContentAsLong(__p);
+
+float_constant = Pattern numericLiteral : isFloatLiteral()
+JBurg.Reduction reducer.getFloatContent(__p);
+
+constant_value = Pattern nullLiteral : 0
+JBurg.Reduction reducer.reduce_nullLiteral_to_constant_value (__p);
+
+constant_value =  Pattern void0Literal: 0
+JBurg.Reduction reducer.reduce_void0Literal_to_constant_value(__p);
+
+constant_value =  Pattern voidConstant: 0
+JBurg.Reduction reducer.reduce_voidOperator_to_constant_value(__p, value);
+
+boolean_constant = Pattern booleanLiteral: 0
+JBurg.Reduction reducer.reduce_booleanLiteral(__p);
+
+string_constant = Pattern stringLiteral : 0
+JBurg.Reduction reducer.getStringLiteralContent (__p);
+
+numeric_constant = integer_constant;
+numeric_constant = uint_constant;
+numeric_constant = double_constant;
+numeric_constant = float_constant;
+
+
+constant_value = string_constant : 1
+JBurg.Reduction reducer.transform_string_constant_to_constant(__p, string_constant);
+
+constant_value = boolean_constant : 1
+JBurg.Reduction reducer.transform_boolean_constant_to_constant(__p, boolean_constant);
+
+constant_value = numeric_constant : 1
+JBurg.Reduction reducer.transform_numeric_constant_to_constant(__p, numeric_constant);
+
+required_constant_value = constant_value;
+
+double_constant =  Pattern numericLiteral : isDoubleLiteral()
+JBurg.Reduction reducer.getDoubleContent(__p);
+
+double_constant =  Pattern doubleLiteral : isDoubleLiteral()
+JBurg.Reduction reducer.getDoubleContent(__p);
+
+//  Fallback code-gen choice if conversion to
+//  double failed in LiteralNumberNode.getNodeID().
+//  It's not likely to work better here,
+//  but the BURM will emit some diagnostics.
+double_constant =  Pattern numericLiteral : 3
+JBurg.Reduction reducer.getDoubleContent(__p);
+
+expression = double_constant : 5
+JBurg.Reduction reducer.transform_double_constant(__p, double_constant);
+
+expression = integer_constant : 5
+JBurg.Reduction reducer.transform_integer_constant(__p, integer_constant);
+
+expression = numeric_constant : 5
+JBurg.Reduction reducer.transform_numeric_constant(__p, numeric_constant);
+
+expression = float_constant : 5
+JBurg.Reduction reducer.transform_float_constant(__p, float_constant);
+
+expression = constant_value : 0
+JBurg.Reduction reducer.transform_constant_value(__p, constant_value);
+
+object_literal = Pattern nullLiteral : 1
+JBurg.Reduction reducer.reduce_nullLiteral_to_object_literal (__p);
+
+object_literal = Pattern objectLiteral : 3
+JBurg.Reduction reducer.reduce_objectLiteral (__p, elements);
+
+object_literal_element = Pattern objectLiteralElement : 0
+JBurg.Reduction reducer.reduce_objectLiteralElement (__p, id, value);
+
+non_resolving_identifier = Pattern nonResolvingIdentifier : 0
+JBurg.Reduction reducer.getIdentifierContent(__p);
+
+expression = non_resolving_identifier : 1
+JBurg.Reduction reducer.transform_non_resolving_identifier(__p, non_resolving_identifier);
+
+object_literal = Pattern regexLiteral: 5
+JBurg.Reduction reducer.reduce_regexLiteral(__p);
+
+object_literal = Pattern void0Literal: 1
+JBurg.Reduction reducer.reduce_void0Literal_to_object_literal(__p);
+
+object_literal = Pattern void0Operator: 1
+JBurg.Reduction reducer.reduce_void0Operator(__p);
+
+expression = Pattern voidOperator : 1
+JBurg.Reduction reducer.reduce_voidOperator_to_expression (__p, expr);
+
+boolean_literal = boolean_constant: 1
+JBurg.Reduction reducer.transform_boolean_constant(__p, boolean_constant);
+
+array_literal = Pattern arrayLiteral : 1
+JBurg.Reduction reducer.reduce_arrayLiteral (__p, elements);
+
+vector_literal = Pattern vectorLiteral: 1
+JBurg.Reduction reducer.reduce_vectorLiteral(__p, type_param, elements);
+
+decl_name = Pattern simpleName : 0
+JBurg.Reduction reducer.reduce_declName(__p);
+

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseCaminoWindow.txt
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseCaminoWindow.txt b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseCaminoWindow.txt
new file mode 100644
index 0000000..1ad0279
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseCaminoWindow.txt
@@ -0,0 +1,59 @@
+--------------------------------------------------------------------------------
+--
+--  Licensed to the Apache Software Foundation (ASF) under one or more
+--  contributor license agreements.  See the NOTICE file distributed with
+--  this work for additional information regarding copyright ownership.
+--  The ASF licenses this file to You under the Apache License, Version 2.0
+--  (the "License"); you may not use this file except in compliance with
+--  the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--  Unless required by applicable law or agreed to in writing, software
+--  distributed under the License is distributed on an "AS IS" BASIS,
+--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--  See the License for the specific language governing permissions and
+--  limitations under the License.
+--
+--------------------------------------------------------------------------------
+
+-- tell Camino browser to close all windows that have the specified URL
+tell application "Camino"
+	-- 'closed' keeps track of whether we have closed any documents
+	set closed to false
+
+	set done to false
+	repeat until done
+		set done to true
+
+		-- Camino has some hidden windows that are not regular browser
+		-- windows.  Those windows don't have a URL.  We keep count of
+		-- how many windows do have a URL.
+		set countOfWindowsWithURL to 0
+
+		repeat with win in windows
+			if URL of win exists then
+				if URL of win is item 1 of argv then
+					close win
+					set closed to true
+
+					-- since we have closed a document, we must restart the loop
+					set done to false
+					exit repeat
+				else
+					set countOfWindowsWithURL to countOfWindowsWithURL+1
+				end if
+			end if
+		end repeat
+	end repeat
+
+	-- if we closed at least one Safari window, and no more are
+	-- open, then tell Safari to exit
+	if closed and countOfWindowsWithURL is 0 then 
+		quit
+		set closed to "appquit"
+	end if
+
+	-- return true if we closed at least one window, false if not, appquit if told browser to quit
+	closed
+end tell

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseSafariWindow.txt
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseSafariWindow.txt b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseSafariWindow.txt
new file mode 100644
index 0000000..a03b14d
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptCloseSafariWindow.txt
@@ -0,0 +1,53 @@
+--------------------------------------------------------------------------------
+--
+--  Licensed to the Apache Software Foundation (ASF) under one or more
+--  contributor license agreements.  See the NOTICE file distributed with
+--  this work for additional information regarding copyright ownership.
+--  The ASF licenses this file to You under the Apache License, Version 2.0
+--  (the "License"); you may not use this file except in compliance with
+--  the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--  Unless required by applicable law or agreed to in writing, software
+--  distributed under the License is distributed on an "AS IS" BASIS,
+--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--  See the License for the specific language governing permissions and
+--  limitations under the License.
+--
+--------------------------------------------------------------------------------
+
+-- tell Safari to close all windows that have the specified URL
+tell application "Safari"
+	-- 'closed' keeps track of whether we have closed any documents
+	set closed to false
+
+	set done to false
+	repeat until done
+		set done to true
+		repeat with w in windows
+			try
+				repeat with t in tabs of w
+					if URL of t is item 1 of argv then
+						close t
+						set closed to true
+
+						-- since we have closed a document, we must restart the loop
+						set done to false
+						exit repeat
+					end if
+				end repeat
+			end try
+		end repeat
+	end repeat
+
+	-- if we closed at least one Safari window, and no more are
+	-- open, then tell Safari to exit
+	if closed and (count of documents) is 0 then		
+		quit
+		set closed to "appquit"
+	end if
+
+	-- return true if we closed at least one window, false if not
+	closed
+end tell

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptGetDefaultBrowserName.txt
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptGetDefaultBrowserName.txt b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptGetDefaultBrowserName.txt
new file mode 100644
index 0000000..c2d6f9e
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/appleScriptGetDefaultBrowserName.txt
@@ -0,0 +1,33 @@
+--------------------------------------------------------------------------------
+--
+--  Licensed to the Apache Software Foundation (ASF) under one or more
+--  contributor license agreements.  See the NOTICE file distributed with
+--  this work for additional information regarding copyright ownership.
+--  The ASF licenses this file to You under the Apache License, Version 2.0
+--  (the "License"); you may not use this file except in compliance with
+--  the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--  Unless required by applicable law or agreed to in writing, software
+--  distributed under the License is distributed on an "AS IS" BASIS,
+--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--  See the License for the specific language governing permissions and
+--  limitations under the License.
+--
+--------------------------------------------------------------------------------
+
+-- Note, this only works on OSX 10.4 and up
+-- Returns the name of the default browser, e.g. "Safari", "Firefox", "Camino"; or "" if not known
+set p to POSIX path of (path to preferences) & "com.apple.LaunchServices.plist"
+tell application "System Events" to tell property list item "LSHandlerRoleAll" of (property list item 1 of property list item "LSHandlers" of property list file p whose value contains "http") to if exists then
+	set v to value -- now v is, for example, "com.apple.safari"
+	-- "application file id v" returns a file; so we are setting, for example,
+	-- "n" to "Safari.app" and "e" to "app"
+	tell application "Finder" to set {name:n, name extension:e} to application file id v
+	-- strip off the ".app" extension
+	tell (count e) + 1 to return n's text 1 thru -(1 mod it + it)
+end if
+
+-- if we get here, we couldn't find an "http" handler, so we don't know the default browser
+""

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_da.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_da.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_da.properties
new file mode 100644
index 0000000..a88f2e3
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_da.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Funktioner i ${fileName}#${fileNumber}
+unknown = ukendt
+empty = <empty>
+processTerminatedWithoutDebuggerConnection = Processen blev afsluttet uden at der blev etableret forbindelse til fejlfinding.
+processTerminatedUnexpectedly = Handlingen blev uventet afbrudt.
+serverSocketNotListening = Serversoklen lytter ikke.
+functionCallsNotSupported = Den valgte afspiller underst\u00f8tter ikke funktionskald
+watchpointsNotSupported = Den valgte afspiller underst\u00f8tter ikke overv\u00e5gningspunkter
+exceptionBreakpointsNotSupported = Den valgte afspiller underst\u00f8tter ikke undtagelsespausepunkter
+operatorNotSupported = Den valgte afspiller underst\u00f8tter ikke operatoren "${operator}"

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_de.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_de.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_de.properties
new file mode 100644
index 0000000..4a300bf
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_de.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Funktionen in ${fileName}#${fileNumber}
+unknown = unbekannt
+empty = <leer>
+processTerminatedWithoutDebuggerConnection = Der Vorgang wurde beendet, ohne dass eine Verbindung mit dem Debugger hergestellt wurde.
+processTerminatedUnexpectedly = Der Prozess wurde unerwartet beendet.
+serverSocketNotListening = Server-Socket wartet nicht auf Meldungen.
+functionCallsNotSupported = Zielplayer unterst\u00fctzt keine Funktionsaufrufe
+watchpointsNotSupported = Zielplayer unterst\u00fctzt keine Watchpoints
+exceptionBreakpointsNotSupported = Zielplayer unterst\u00fctzt keine Ausnahme-Haltepunkte
+operatorNotSupported = Zielplayer unterst\u00fctzt nicht den Operator \u201e${operator}\u201c

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_en.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_en.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_en.properties
new file mode 100644
index 0000000..f45bedf
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_en.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Functions in ${fileName}#${fileNumber}
+unknown = unknown
+empty = <empty>
+processTerminatedWithoutDebuggerConnection = Process terminated without establishing connection to debugger.
+processTerminatedUnexpectedly = Process terminated unexpectedly.
+serverSocketNotListening = Server socket not listening.
+functionCallsNotSupported = Target player does not support function calls
+watchpointsNotSupported = Target player does not support watchpoints
+exceptionBreakpointsNotSupported = Target player does not support exception breakpoints
+operatorNotSupported = Target player does not support the "${operator}" operator

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_es.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_es.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_es.properties
new file mode 100644
index 0000000..38bbe42
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_es.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Funciones en ${fileName}#${fileNumber}
+unknown = desconocido
+empty = <vac\u00edo>
+processTerminatedWithoutDebuggerConnection = Proceso terminado sin establecer conexi\u00f3n con el depurador.
+processTerminatedUnexpectedly = El proceso se ha terminado de forma inesperada.
+serverSocketNotListening = El socket del servidor no est\u00e1 detectando.
+functionCallsNotSupported = El reproductor de destino no admite llamadas de funci\u00f3n
+watchpointsNotSupported = El reproductor de destino no admite puntos de observaci\u00f3n
+exceptionBreakpointsNotSupported = El reproductor de destino no admite puntos de corte de excepciones
+operatorNotSupported = El reproductor de destino no admite el operador "${operator}"

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fi.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fi.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fi.properties
new file mode 100644
index 0000000..352ec32
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fi.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Toiminnot kohteessa ${fileName}#${fileNumber}
+unknown = tuntematon
+empty = <tyhj\u00e4>
+processTerminatedWithoutDebuggerConnection = Prosessi lopetettiin muodostamatta yhteytt\u00e4 virheenkorjaukseen.
+processTerminatedUnexpectedly = Prosessi p\u00e4\u00e4tettiin odottamatta.
+serverSocketNotListening = Palvelimen vastake ei ole kuuntelutilassa.
+functionCallsNotSupported = Kohdesoitin ei tue toimintopuheluita
+watchpointsNotSupported = Kohdesoitin ei tue katselukohtia
+exceptionBreakpointsNotSupported = Kohdesoitin ei tue poikkeuksien keskeytyskohtia
+operatorNotSupported = Kohdesoitin ei tue operaattoria "${operator}"

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fr.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fr.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fr.properties
new file mode 100644
index 0000000..8a64fd0
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_fr.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Fonctions de ${fileName}#${fileNumber}
+unknown = Inconnu
+empty = <vide>
+processTerminatedWithoutDebuggerConnection = Le processus s'est termin\u00e9 sans \u00e9tablir de connexion vers le d\u00e9bogueur.
+processTerminatedUnexpectedly = Processus termin\u00e9 de mani\u00e8re inattendue.
+serverSocketNotListening = Le socket du serveur n'est pas en mode d'\u00e9coute.
+functionCallsNotSupported = Le lecteur cible ne prend pas en charge les appels de fonction
+watchpointsNotSupported = Le lecteur cible ne prend pas en charge les points de contr\u00f4le
+exceptionBreakpointsNotSupported = Le lecteur cible ne prend pas en charge les points d'arr\u00eat d'exception.
+operatorNotSupported = Le lecteur cible ne prend pas en charge l'op\u00e9rateur "${operator}"

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/07f5a7de/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_it.properties
----------------------------------------------------------------------
diff --git a/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_it.properties b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_it.properties
new file mode 100644
index 0000000..20770a9
--- /dev/null
+++ b/debugger/src/main/resources/flash/tools/debugger/concrete/djapi_it.properties
@@ -0,0 +1,29 @@
+################################################################################
+##
+##  Licensed to the Apache Software Foundation (ASF) under one or more
+##  contributor license agreements.  See the NOTICE file distributed with
+##  this work for additional information regarding copyright ownership.
+##  The ASF licenses this file to You under the Apache License, Version 2.0
+##  (the "License"); you may not use this file except in compliance with
+##  the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+##  Unless required by applicable law or agreed to in writing, software
+##  distributed under the License is distributed on an "AS IS" BASIS,
+##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##  See the License for the specific language governing permissions and
+##  limitations under the License.
+##
+################################################################################
+
+functionsInFile = Funzioni in ${fileName}#${fileNumber}
+unknown = sconosciuto
+empty = <vuoto>
+processTerminatedWithoutDebuggerConnection = Processo terminato senza stabilire la connessione con debugger.
+processTerminatedUnexpectedly = Il processo \u00e8 stato interrotto inaspettatamente.
+serverSocketNotListening = Socket del server non in ascolto.
+functionCallsNotSupported = Il Player di destinazione non supporta le chiamate di funzione
+watchpointsNotSupported = Il Player di destinazione non supporta i punti di controllo
+exceptionBreakpointsNotSupported = Il Player di destinazione non supporta i punti di interruzione delle eccezioni
+operatorNotSupported = Il Player di destinazione non supporta l'operatore "${operator}"